mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2023-10-10 13:36:59 +02:00
init scripts need to send SIGTERM not SIGHUP
* Removed -HUP so the default -TERM signal is sent instead. - hyperiond only listens for TERM and INT. HUP is often used to get an exe to reread its config Changed pgrep to add '-x' so it wont partial match on the exe name. - I have multiple instances with multiple hyperiond-instance1 names - this ensures the service script only kills the right process * reversing errant change to hyperion.systemd.sh Former-commit-id: 7df14c9ab31bd808df7f286a8db89de3ac7d18bd
This commit is contained in:
parent
8111d320e3
commit
908612adf8
@ -22,7 +22,7 @@ PIDFILE=/var/run/$NAME.pid
|
|||||||
SCRIPTNAME=/etc/init.d/$NAME
|
SCRIPTNAME=/etc/init.d/$NAME
|
||||||
case "$1" in
|
case "$1" in
|
||||||
start)
|
start)
|
||||||
if [ $(pgrep -l $NAME |wc -l) = 1 ]
|
if [ $(pgrep -xl $NAME |wc -l) = 1 ]
|
||||||
then
|
then
|
||||||
printf "%-50s\n" "Already running..."
|
printf "%-50s\n" "Already running..."
|
||||||
exit 1
|
exit 1
|
||||||
@ -59,8 +59,7 @@ stop)
|
|||||||
PID=`cat $PIDFILE`
|
PID=`cat $PIDFILE`
|
||||||
cd $DAEMON_PATH
|
cd $DAEMON_PATH
|
||||||
if [ -f $PIDFILE ]; then
|
if [ -f $PIDFILE ]; then
|
||||||
hyperion-remote -c black
|
kill $PID
|
||||||
kill -HUP $PID
|
|
||||||
printf "%s\n" "Ok"
|
printf "%s\n" "Ok"
|
||||||
rm -f $PIDFILE
|
rm -f $PIDFILE
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user