From 92ff29512ffae23ab2b6453ab4bce35d273b1a8e Mon Sep 17 00:00:00 2001 From: Rick Falkvinge Date: Wed, 4 Jan 2017 17:03:19 +0100 Subject: [PATCH 1/2] Changed pidof to pidof -s, suppressing install warning --- BuildFiles/Packaging/templates/postinst-backend.template | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BuildFiles/Packaging/templates/postinst-backend.template b/BuildFiles/Packaging/templates/postinst-backend.template index c1412561..f0cbc653 100644 --- a/BuildFiles/Packaging/templates/postinst-backend.template +++ b/BuildFiles/Packaging/templates/postinst-backend.template @@ -9,7 +9,7 @@ mkdir -p /var/lib/swarmops/upload #if we're running systemd, use systemd; #otherwise, use upstart -if [ -z $(pidof systemd) ]; then +if [ -z $(pidof -s systemd) ]; then #start the daemon /etc/init.d/swarmops-backend start #register the daemon From 65176942623cdd2b0616c7806642d2ddb6755168 Mon Sep 17 00:00:00 2001 From: Rick Falkvinge Date: Wed, 4 Jan 2017 17:05:59 +0100 Subject: [PATCH 2/2] Trying to fix an install warning in frontend --- BuildFiles/Packaging/templates/preinst-frontend.template | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BuildFiles/Packaging/templates/preinst-frontend.template b/BuildFiles/Packaging/templates/preinst-frontend.template index 7d2d3ef5..6815cc99 100644 --- a/BuildFiles/Packaging/templates/preinst-frontend.template +++ b/BuildFiles/Packaging/templates/preinst-frontend.template @@ -8,7 +8,7 @@ if [ ! -e /etc/swarmops/database.config ]; then if [ -e /etc/init.d/apache2 ]; then - if [ /etc/init.d/apache2 status > /dev/null ]; then + if [ -z $(pidof -s apache2) ]; then # Set a flag to postinst to restart Apache echo foo > /tmp/swarmops-restart-apache.flag /etc/init.d/apache2 stop