summarylogtreecommitdiffstats
path: root/run.sh
diff options
context:
space:
mode:
authorfrnmst/Franco Masotti2016-10-20 17:23:32 +0200
committerfrnmst/Franco Masotti2016-10-20 17:23:32 +0200
commitc1f5eeff9008cc40755decb5be9459354a8c6476 (patch)
tree681ef00b6c3b431aaec3d1228008988f0d56ea78 /run.sh
parent343add4746671ace27c6cd1f6637ed37c03d75c7 (diff)
downloadaur-c1f5eeff9008cc40755decb5be9459354a8c6476.tar.gz
Updated files from the dev branch.
Diffstat (limited to 'run.sh')
-rwxr-xr-xrun.sh19
1 files changed, 16 insertions, 3 deletions
diff --git a/run.sh b/run.sh
index b4e56810b964..f78b479a03e8 100755
--- a/run.sh
+++ b/run.sh
@@ -22,8 +22,8 @@
#
#
-pkg_dir="/opt/rserve-sandbox-docker"
-pid_file="/run/rserve-sandbox-docker.pid"
+pkg_dir="/usr/share/rserve-sandbox-docker"
+pid_file="/run/rserve-sandbox-docker/rserve-sandbox-docker.pid"
user="rsd"
group="rsd"
docker_image_name="rserve"
@@ -75,6 +75,19 @@ initialize()
fi
}
+killd()
+{
+ # kill action only if process exists.
+ if [ -f "$pid_file" ]; then
+ pid=$(cat "$pid_file")
+ ps -q $pid > /dev/null
+ if [ $? -eq 0 ]; then
+ make -C "$pkg_dir" stop
+ fi
+ fi
+}
+
+
startd()
{
local pid=""
@@ -145,7 +158,7 @@ killd()
pid=$(cat "$pid_file")
ps -q $pid > /dev/null
if [ $? -eq 0 ]; then
- kill -s SIGTERM $pid
+ kill -s TERM $pid
fi
fi
}