From 2d4040a9cf2a9fd2d0dc0bc7cf1b429ea1cae05a Mon Sep 17 00:00:00 2001 From: Moul Date: Fri, 31 Mar 2017 11:36:28 +0200 Subject: [PATCH] [fix] #21: stop daemon only when running. --- scripts/functions.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/scripts/functions.sh b/scripts/functions.sh index eaeda40..9dd401b 100644 --- a/scripts/functions.sh +++ b/scripts/functions.sh @@ -46,10 +46,12 @@ sudo cp $nginx_conf /etc/nginx/conf.d/$domain.d/$app.conf sudo service nginx reload } - REMOVE_DUNITER () { -# Stop duniter daemon -sudo duniter stop +# Stop duniter daemon if running +sudo duniter status +if [ `echo "$?"` == 0 ]; then + sudo duniter stop +fi # Remove Duniter package sudo dpkg -r duniter