mirror of
https://github.com/telekom-security/tpotce.git
synced 2025-04-28 19:28:50 +00:00
fix race
This commit is contained in:
parent
d5a299c34c
commit
d0cd1fe11f
1 changed files with 7 additions and 4 deletions
|
@ -32,9 +32,12 @@ done
|
||||||
# We do not want to get interrupted by a check
|
# We do not want to get interrupted by a check
|
||||||
touch /var/run/check.lock
|
touch /var/run/check.lock
|
||||||
|
|
||||||
# Delete all T-Pot upstart scripts
|
# Stop T-Pot services and delete all T-Pot upstart scripts
|
||||||
|
echo "### Stopping T-Pot services and cleaning up."
|
||||||
for i in $(ls /data/upstart/);
|
for i in $(ls /data/upstart/);
|
||||||
do
|
do
|
||||||
|
service $i stop
|
||||||
|
sleep 2
|
||||||
rm -rf /etc/init/$i || true;
|
rm -rf /etc/init/$i || true;
|
||||||
done
|
done
|
||||||
|
|
||||||
|
@ -45,12 +48,12 @@ for i in $(cat /data/images.conf);
|
||||||
cp /data/upstart/"$i".conf /etc/init/;
|
cp /data/upstart/"$i".conf /etc/init/;
|
||||||
done
|
done
|
||||||
|
|
||||||
# Allow checks to resume
|
|
||||||
rm /var/run/check.lock
|
|
||||||
|
|
||||||
# Announce reboot
|
# Announce reboot
|
||||||
echo "### Rebooting in 60 seconds for the changes to take effect."
|
echo "### Rebooting in 60 seconds for the changes to take effect."
|
||||||
sleep 60
|
sleep 60
|
||||||
|
|
||||||
|
# Allow checks to resume
|
||||||
|
rm /var/run/check.lock
|
||||||
|
|
||||||
# Reboot
|
# Reboot
|
||||||
reboot
|
reboot
|
||||||
|
|
Loading…
Reference in a new issue