From 5ccdbfa305f949b45cc93c4f69b7c3d4fe3b9cc0 Mon Sep 17 00:00:00 2001 From: Nathan Adams Date: Fri, 27 Sep 2013 21:53:51 -0500 Subject: [PATCH] Updating sync mercurial script to test if it is a debian based distro --- indefero/scripts/SyncMercurial.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/indefero/scripts/SyncMercurial.sh b/indefero/scripts/SyncMercurial.sh index 54ee937..8253f7e 100644 --- a/indefero/scripts/SyncMercurial.sh +++ b/indefero/scripts/SyncMercurial.sh @@ -1,9 +1,13 @@ #!/bin/sh private_notify="/home/mercurial/tmp/notify.tmp" -# reload_cmd="/usr/sbin/apachectl -k graceful" -reload_cmd="sudo /etc/init.d/apache2 reload" +# Test for debian systems +if [ -e /etc/debian_version ]; then + reload_cmd="sudo /etc/init.d/apache2 reload" +else + reload_cmd="/usr/sbin/apachectl -k graceful" +fi if [ -e $private_notify ]; then rm -f $private_notify $reload_cmd