mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-21 04:06:46 +00:00
Test for sockect presence with -e, not -f
Always remove socket before start, it may left after panic reboot
This commit is contained in:
parent
9648b0fd17
commit
275308e55f
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=88666
@ -13,16 +13,12 @@ case "$1" in
|
||||
start)
|
||||
if [ -x ${PREFIX}/sbin/sentinel -a -f ${PREFIX}/etc/sentinel.cf ]
|
||||
then
|
||||
if [ -f ${SOCKET} ]
|
||||
then
|
||||
killall sentinel
|
||||
rm -f $SOCKET
|
||||
fi
|
||||
rm -f ${SOCKET}
|
||||
${PREFIX}/sbin/sentinel -c ${PREFIX}/etc/sentinel.cf -p unix:${SOCKET} -d && echo -n ' sentinel'
|
||||
fi
|
||||
;;
|
||||
stop)
|
||||
if [ -f ${SOCKET} ]
|
||||
if [ -e ${SOCKET} ]
|
||||
then
|
||||
killall sentinel
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user