Merge branch 'version-1' into feature/landingpage-as-container

This commit is contained in:
Patrick Skowronek
2022-05-10 14:00:58 +02:00
6 changed files with 46 additions and 37 deletions

View File

@ -1,14 +1,15 @@
#!/bin/bash -e
source lib/functions.sh
echo "This script add's a user with password to the bridghead"
log "This script add's a user with password to the bridghead"
if [ $# -eq 0 ]; then
echo "No arguments provided, please provide the project name"
log "No arguments provided, please provide the project name"
exit 1
fi
if [ ! -f /etc/systemd/system/bridgehead@$1.service.d/override.conf ]; then
echo "Please create a Service first, with setup-bridgehead-units.sh"
log "Please create a Service first, with setup-bridgehead-units.sh"
exit
fi

View File

@ -3,12 +3,12 @@
source lib/functions.sh
if [ $# -eq 0 ]; then
echo "Please provide a Project as argument"
log "Please provide a Project as argument"
exit 1
fi
if [ $1 != "ccp" ] && [ $1 != "nngm" ] && [ $1 != "gbn" ]; then
echo "Please provide a supported project like ccp, gbn or nngm"
log "Please provide a supported project like ccp, gbn or nngm"
exit 1
fi
@ -16,7 +16,7 @@ export project=$1
#checkRequirements // not needed when uninstalling
echo "Stopping systemd services and removing bridgehead ..."
log "Stopping systemd services and removing bridgehead ..."
systemctl disable --now bridgehead@${project}.service bridgehead-update@${project}.timer bridgehead-update@${project}.service

View File

@ -5,12 +5,12 @@ source lib/functions.sh
exitIfNotRoot
if [ $# -eq 0 ]; then
echo "Please provide a Project as argument"
log "Please provide a Project as argument"
exit 1
fi
if [ $1 != "ccp" ] && [ $1 != "nngm" ] && [ $1 != "gbn" ]; then
echo "Please provide a supported project like ccp, gbn or nngm"
log "Please provide a supported project like ccp, gbn or nngm"
exit 1
fi
@ -30,9 +30,9 @@ systemctl daemon-reload
echo
if ! systemctl is-active --quiet bridgehead@"${project}"; then
echo "Enabling autostart of bridgehead@${project}.service"
log "Enabling autostart of bridgehead@${project}.service"
systemctl enable bridgehead@"${project}"
echo "Enabling nightly updates for bridgehead@${project}.service ..."
log "Enabling nightly updates for bridgehead@${project}.service ..."
systemctl enable --now bridgehead-update@"${project}".timer
fi