added libnotify messages for start and stop messages
This commit is contained in:
parent
1ba4bf672d
commit
8e94958f4f
@ -1,21 +1,32 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
GITBUCKETPATH="/home/mollusk/Downloads"
|
||||||
|
WARFILE="gitbucket.war"
|
||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
start) nohup java -jar /home/mollusk/Downloads/gitbucket.war &> /dev/null &
|
start) nohup java -jar ${GITBUCKETPATH}/${WARFILE} &> /dev/null &
|
||||||
|
sleep 1
|
||||||
PID=$(pidof java)
|
PID=$(pidof java)
|
||||||
if [ ${PID} ];then
|
if [ ${PID} ];then
|
||||||
echo "Gitbucket started on pid ${PID}"
|
notify-send "Gitbucket started on PID: ${PID}"
|
||||||
|
echo "Gitbucket started on PID: ${PID}"
|
||||||
else
|
else
|
||||||
|
notify-send "Gitbucket Failed to start!"
|
||||||
echo "Gitbucket process failed to start!"
|
echo "Gitbucket process failed to start!"
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
stop) killall java
|
stop) killall java
|
||||||
if [ ! ${PID} ];then
|
if [ ! ${PID} ];then
|
||||||
|
notify-send "Gitbucket was terminated"
|
||||||
echo "Gitbucket was terminated"
|
echo "Gitbucket was terminated"
|
||||||
else
|
else
|
||||||
|
notify-send "There was a problem terminating Gitbucket"
|
||||||
echo "There was a problem terminating Gitbucket"
|
echo "There was a problem terminating Gitbucket"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
;;
|
||||||
|
|
||||||
|
status) ps -fC java
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
Loading…
x
Reference in New Issue
Block a user