added checks and messages for PID
This commit is contained in:
parent
a3bd344ad7
commit
1ba4bf672d
@ -3,7 +3,19 @@
|
||||
|
||||
case "$1" in
|
||||
start) nohup java -jar /home/mollusk/Downloads/gitbucket.war &> /dev/null &
|
||||
PID=$(pidof java)
|
||||
if [ ${PID} ];then
|
||||
echo "Gitbucket started on pid ${PID}"
|
||||
else
|
||||
echo "Gitbucket process failed to start!"
|
||||
fi
|
||||
;;
|
||||
stop) killall java
|
||||
if [ ! ${PID} ];then
|
||||
echo "Gitbucket was terminated"
|
||||
else
|
||||
echo "There was a problem terminating Gitbucket"
|
||||
fi
|
||||
|
||||
;;
|
||||
esac
|
||||
|
Loading…
x
Reference in New Issue
Block a user