diff options
author | frnmst/Franco Masotti | 2016-10-20 17:23:32 +0200 |
---|---|---|
committer | frnmst/Franco Masotti | 2016-10-20 17:23:32 +0200 |
commit | c1f5eeff9008cc40755decb5be9459354a8c6476 (patch) | |
tree | 681ef00b6c3b431aaec3d1228008988f0d56ea78 /run.sh | |
parent | 343add4746671ace27c6cd1f6637ed37c03d75c7 (diff) | |
download | aur-c1f5eeff9008cc40755decb5be9459354a8c6476.tar.gz |
Updated files from the dev branch.
Diffstat (limited to 'run.sh')
-rwxr-xr-x | run.sh | 19 |
1 files changed, 16 insertions, 3 deletions
@@ -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 } |