pid
Signed-off-by: Gwenhael Le Moine <gwenhael.le.moine@gmail.com>
This commit is contained in:
parent
de37d9e242
commit
a71fba39f2
1 changed files with 7 additions and 7 deletions
|
@ -70,15 +70,15 @@ PROCESSNAME=\$CMD
|
||||||
# Option to run with deamon
|
# Option to run with deamon
|
||||||
OPTIONS=" --config /etc/gitea/app.ini"
|
OPTIONS=" --config /etc/gitea/app.ini"
|
||||||
|
|
||||||
PIDFILE=/var/run/gitea.pid
|
PIDFILE=/var/lib/gitea/gitea.pid
|
||||||
|
|
||||||
func_stop() {
|
func_stop() {
|
||||||
[ -e \$PIDFILE ] && kill \$(cat \$PIDFILE)
|
[ -e \$PIDFILE ] && kill \$(cat \$PIDFILE)
|
||||||
if [ "\$(ps aux | grep \$PROCESSNAME | grep -v grep)" ]; then
|
# if [ "\$(ps aux | grep \$PROCESSNAME | grep -v grep)" ]; then
|
||||||
echo -n "Stopping \$NAME ... "
|
# echo -n "Stopping \$NAME ... "
|
||||||
killall \$PROCESSNAME
|
# killall \$PROCESSNAME
|
||||||
sleep 2
|
# sleep 2
|
||||||
fi
|
# fi
|
||||||
|
|
||||||
if [ ! "\$(ps aux | grep \$PROCESSNAME | grep -v grep)" ]; then
|
if [ ! "\$(ps aux | grep \$PROCESSNAME | grep -v grep)" ]; then
|
||||||
echo "Done!"
|
echo "Done!"
|
||||||
|
@ -89,7 +89,7 @@ func_stop() {
|
||||||
|
|
||||||
func_start() {
|
func_start() {
|
||||||
echo -n "Starting \$NAME ... "
|
echo -n "Starting \$NAME ... "
|
||||||
su - \$USERNAME -c "\$CMD \$OPTIONS" --pid \$PIDFILE &
|
su - \$USERNAME -c "\$CMD --pid \$PIDFILE \$OPTIONS" &
|
||||||
sleep 2
|
sleep 2
|
||||||
|
|
||||||
if [ "\$(ps aux | grep \$PROCESSNAME | grep -v grep)" ]; then
|
if [ "\$(ps aux | grep \$PROCESSNAME | grep -v grep)" ]; then
|
||||||
|
|
Loading…
Reference in a new issue