mirror of
https://github.com/samply/bridgehead.git
synced 2025-06-16 21:50:14 +02:00
Shorten installation by including some installation steps into a shell script
This commit is contained in:
committed by
Martin Lablans
parent
865870ea91
commit
b175c55f5c
24
lib/uninstall-bridgehead.sh
Executable file
24
lib/uninstall-bridgehead.sh
Executable file
@ -0,0 +1,24 @@
|
||||
#!/bin/bash -e
|
||||
|
||||
source lib/functions.sh
|
||||
|
||||
if [ $# -eq 0 ]; then
|
||||
log "ERROR" "Please provide a Project as argument"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
export PROJECT=$1
|
||||
|
||||
#checkRequirements // not needed when uninstalling
|
||||
|
||||
log INFO "Removing bridgehead sudoers permissions."
|
||||
|
||||
rm -vf /etc/sudoers.d/bridgehead-${PROJECT}
|
||||
|
||||
log "INFO" "Stopping system units and removing bridgehead for ${PROJECT} ..."
|
||||
|
||||
systemctl disable --now bridgehead@${PROJECT}.service bridgehead-update@${PROJECT}.timer bridgehead-update@${PROJECT}.service
|
||||
|
||||
rm -v /etc/systemd/system/{bridgehead\@.service,bridgehead-update\@.timer,bridgehead-update\@.service}
|
||||
|
||||
log "INFO" "Successfully removed bridgehead for ${PROJECT} from your system"
|
Reference in New Issue
Block a user