Adding debug visibility echoes to pre-, post- rm, -inst scripts

This commit is contained in:
Rick
2016-11-13 12:08:27 +00:00
parent 2f37aa7492
commit 47dce39342
4 changed files with 14 additions and 2 deletions
@@ -1,6 +1,7 @@
#!/bin/bash
#echo "Swarmops post-installation script running"
#echo "DEBUG: Executing post-installation script, swarmops-backend"
#make sure some directories exist
mkdir -p /var/lib/swarmops/upload
#todo: check for database upgrade
@@ -18,3 +19,5 @@ else
systemctl start swarmops-backend
fi
echo "DEBUG: Exiting post-install script, swarmops-backend"
@@ -1,5 +1,7 @@
#!/bin/bash
echo "DEBUG: Executing post-install script, swarmops-frontend"
# make sure the upload folder exists and is writeable by www-data
# do not make any changes to an already existing folder
@@ -88,3 +90,5 @@ fi
# Always end a frontend update with an Apache reload to clear caches
# /etc/init.d/apache2 reload
echo "DEBUG: Exiting post-install script, swarmops-frontend"
@@ -4,6 +4,8 @@
# (It's very rude to shut down services without asking first like this, but even more rude of the lib-mod-mono
# installer to just bloody hang.)
echo "DEBUG: Executing pre-install script, swarmops-frontend"
if [ ! -e /etc/swarmops/database.config ]; then
if [ -e /etc/init.d/apache2 ]; then
if [ /etc/init.d/apache2 status > /dev/null ]; then
@@ -14,4 +16,5 @@ if [ ! -e /etc/swarmops/database.config ]; then
fi
fi
echo "DEBUG: Exiting pre-install script, swarmops-frontend"
@@ -1,5 +1,7 @@
#! /bin/bash
echo "DEBUG: Executing pre-remove script, swarmops-backend"
# Different paths for systemd and upstart
if [ -z $(pidof systemd) ]; then
@@ -10,4 +12,4 @@ else
systemctl disable swarmops-backend
fi
echo "DEBUG: Exiting pre-remove script, swarmops-backend"