diff --git a/etc/init.d/dm-daq-services b/etc/init.d/dm-daq-services
index 29f4aec555dacd76c794958152105e6fb568c536..6cefdb470c8af27284f41cbbe1deafc109854228 100755
--- a/etc/init.d/dm-daq-services
+++ b/etc/init.d/dm-daq-services
@@ -2,7 +2,7 @@
 
 # Helper script to start and stop DAQ node services
 
-MYDIR=`dirname $0` && cd $MYDIR && MYDIR=`pwd`
+MY_DIR=`dirname $0` && cd $MYDIR && MYDIR=`pwd`
 
 # The list below defines order of starting/stopping services
 startList="mongodb mongo-express daq-web-service cat-web-service"
@@ -21,11 +21,10 @@ case $action in
 esac
 
 # Perform action
-cd $MYDIR
 serviceList="\$"${action}List
 serviceList=`eval "echo $serviceList"`
 for service in $serviceList; do
-    dm-$service $action 
+    $MY_DIR/dm-$service $action 
     sleep 1
 done
 
diff --git a/etc/init.d/dm-ds-services b/etc/init.d/dm-ds-services
index f678e92c8544997a09bed3096d786f5999670660..371d4ee08a66598f5d3c74fcd365fbccc559a8aa 100755
--- a/etc/init.d/dm-ds-services
+++ b/etc/init.d/dm-ds-services
@@ -2,7 +2,7 @@
 
 # Helper script to start and stop DAQ node services
 
-MYDIR=`dirname $0` && cd $MYDIR && MYDIR=`pwd`
+MY_DIR=`dirname $0` && cd $MYDIR && MYDIR=`pwd`
 
 # The list below defines order of starting/stopping services
 startList="postgresql glassfish ds-web-service"
@@ -21,11 +21,10 @@ case $action in
 esac
 
 # Perform action
-cd $MYDIR
 serviceList="\$"${action}List
 serviceList=`eval "echo $serviceList"`
 for service in $serviceList; do
-    dm-$service $action 
+    $MY_DIR/dm-$service $action 
     sleep 1
 done