2022-01-10 16:31:48 +01:00
|
|
|
#!/bin/bash -e
|
2021-12-22 13:18:41 +01:00
|
|
|
|
2022-01-10 16:31:48 +01:00
|
|
|
source lib/functions.sh
|
2021-12-22 13:18:41 +01:00
|
|
|
|
2022-05-04 13:50:33 +02:00
|
|
|
if [ $# -eq 0 ]; then
|
2022-05-09 12:57:24 +02:00
|
|
|
log "Please provide a Project as argument"
|
2022-05-04 13:50:33 +02:00
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ $1 != "ccp" ] && [ $1 != "nngm" ] && [ $1 != "gbn" ]; then
|
2022-05-09 12:57:24 +02:00
|
|
|
log "Please provide a supported project like ccp, gbn or nngm"
|
2022-05-04 13:50:33 +02:00
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
export project=$1
|
|
|
|
|
|
|
|
if ! ./lib/prerequisites.sh; then
|
|
|
|
log "Prerequisites failed, exiting"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2022-05-09 12:57:24 +02:00
|
|
|
log "Stopping systemd services and removing bridgehead ..."
|
2021-12-23 14:54:35 +01:00
|
|
|
|
2022-01-10 16:39:46 +01:00
|
|
|
systemctl disable --now bridgehead@${project}.service bridgehead-update@${project}.timer bridgehead-update@${project}.service
|
2022-01-10 16:36:54 +01:00
|
|
|
|
|
|
|
rm -v /etc/systemd/system/{bridgehead\@.service,bridgehead-update\@.timer,bridgehead-update\@.service}
|