diff --git a/azkaban-exec-server/src/main/bash/azkaban-executor-shutdown.sh b/azkaban-exec-server/src/main/bash/azkaban-executor-shutdown.sh
index 76fd200..bfbca0b 100755
--- a/azkaban-exec-server/src/main/bash/azkaban-executor-shutdown.sh
+++ b/azkaban-exec-server/src/main/bash/azkaban-executor-shutdown.sh
@@ -1,11 +1,19 @@
-#!/bin/bash
-azkaban_dir=$(dirname $0)/..
+#!/usr/bin/env bash
+# Shutdown script for azkaban executor server
+installdir="$(dirname $0)/.."
-executorport=`cat $azkaban_dir/conf/azkaban.properties | grep executor.port | cut -d = -f 2`
-echo "Shutting down current running AzkabanExecutorServer at port $executorport"
+pid=`cat ${installdir}/currentpid`
+port=`cat ${installdir}/executor.port`
-proc=`cat $azkaban_dir/currentpid`
+echo "Killing Executor. [pid: $pid, port: $port]"
-kill $proc
+kill ${pid}
+if [ $? -ne 0 ]; then
+ echo "Error: Shutdown failed"
+ exit 1;
+fi
-cat /dev/null > $azkaban_dir/currentpid
+rm ${installdir}/currentpid
+rm ${installdir}/executor.port
+
+echo "done."
\ No newline at end of file
diff --git a/azkaban-web-server/src/main/bash/azkaban-web-shutdown.sh b/azkaban-web-server/src/main/bash/azkaban-web-shutdown.sh
index 4dde70a..cfd0d40 100755
--- a/azkaban-web-server/src/main/bash/azkaban-web-shutdown.sh
+++ b/azkaban-web-server/src/main/bash/azkaban-web-shutdown.sh
@@ -1,8 +1,15 @@
-azkaban_dir=$(dirname $0)/..
+#!/usr/bin/env bash
+# Shutdown script for azkaban web server
+installdir="$(dirname $0)/.."
-#!/bin/bash
-proc=`cat $azkaban_dir/currentpid`
-echo "killing AzkabanWebServer"
-kill $proc
+pid=`cat ${installdir}/currentpid`
+echo "Killing Web Server. [pid: $pid]"
-cat /dev/null > $azkaban_dir/currentpid
+kill ${pid}
+if [ $? -ne 0 ]; then
+ echo "Error: Shutdown failed"
+ exit 1;
+fi
+
+rm ${installdir}/currentpid
+echo "done."