Moved all systemd untis to user bridgehead

This commit is contained in:
root
2022-05-04 09:14:32 +02:00
parent 5bacdf02fb
commit 26c9fc0cff
6 changed files with 20 additions and 11 deletions

View File

@ -5,11 +5,6 @@ then
mkdir landing
fi
if [ ! -f ./landing/index.html ]
then
touch index.html
fi
CENTRAL_SERVICES=" <tr>
<td>CCP-IT</td>
<td><a href=\"https://monitor.vmitro.de/icingaweb2/dashboard\">Monitoring Service</td>

View File

@ -4,7 +4,7 @@
## Check if user is a su
echo "Welcome to the starting a bridgehead. We will get your instance up and running in no time"
echo "First we will check if all prerequisites are met ..."
prerequisites="git docker docker-compose cat"
prerequisites="git docker docker-compose"
for prerequisite in $prerequisites; do
$prerequisite --version 2>&1
is_available=$?

View File

@ -3,7 +3,7 @@
source lib/functions.sh
if ! su bridgehead ./lib/prerequisites.sh; then
if ! ./lib/prerequisites.sh; then
log "Prerequisites failed, exiting"
exit 1
fi
@ -18,8 +18,6 @@ cp -v \
systemctl daemon-reload
su bridgehead source ./lib/generate.sh
echo
if ! systemctl is-active --quiet bridgehead@"${project}"; then

View File

@ -3,8 +3,10 @@ Description=Bridgehead (%i) Update Service
[Service]
Type=oneshot
User=bridgehead
WorkingDirectory=/srv/docker/bridgehead/
ExecStart=/bin/bash -c "/srv/docker/bridgehead/update-bridgehead.sh %i"
ExecStart=/srv/docker/bridgehead/update-bridgehead.sh %i
[Install]
WantedBy=multi-user.target

View File

@ -8,7 +8,6 @@ RestartSec=30
WorkingDirectory=/srv/docker/bridgehead/
ExecStartPre=/srv/docker/bridgehead/stop-bridgehead.sh %i
ExecStart=/srv/docker/bridgehead/start-bridgehead.sh %i
RemainAfterExit=true
ExecStop=/srv/docker/bridgehead/stop-bridgehead.sh %i