From a71fba39f2aa4a3503bc9ff49fca93e552ef1aa8 Mon Sep 17 00:00:00 2001 From: Gwenhael Le Moine Date: Wed, 6 Feb 2019 15:40:03 +0100 Subject: [PATCH] pid Signed-off-by: Gwenhael Le Moine --- n/gitea/SlackBuild | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/n/gitea/SlackBuild b/n/gitea/SlackBuild index f083f56e..924fdbc1 100755 --- a/n/gitea/SlackBuild +++ b/n/gitea/SlackBuild @@ -70,15 +70,15 @@ PROCESSNAME=\$CMD # Option to run with deamon OPTIONS=" --config /etc/gitea/app.ini" -PIDFILE=/var/run/gitea.pid +PIDFILE=/var/lib/gitea/gitea.pid func_stop() { [ -e \$PIDFILE ] && kill \$(cat \$PIDFILE) - if [ "\$(ps aux | grep \$PROCESSNAME | grep -v grep)" ]; then - echo -n "Stopping \$NAME ... " - killall \$PROCESSNAME - sleep 2 - fi + # if [ "\$(ps aux | grep \$PROCESSNAME | grep -v grep)" ]; then + # echo -n "Stopping \$NAME ... " + # killall \$PROCESSNAME + # sleep 2 + # fi if [ ! "\$(ps aux | grep \$PROCESSNAME | grep -v grep)" ]; then echo "Done!" @@ -89,7 +89,7 @@ func_stop() { func_start() { echo -n "Starting \$NAME ... " - su - \$USERNAME -c "\$CMD \$OPTIONS" --pid \$PIDFILE & + su - \$USERNAME -c "\$CMD --pid \$PIDFILE \$OPTIONS" & sleep 2 if [ "\$(ps aux | grep \$PROCESSNAME | grep -v grep)" ]; then