2113ed46b2
$"str" is supposed to translate str (depending on the current locale). In ash/dash/..., it cannot be expanded, so commands like echo $"Usage: $0 start|stop" are printed as '$Usage: SCRIPT start|stop' in [d]ash, and as 'Usage: SCRIPT start|stop' in bash. This patch removes the '$' in front of '"'. Command(s) used for editing: find . -type f -name '[SK][0-9][0-9]*' | \ xargs sed -r -e 's@[$](["])@\1@g' -i Signed-off-by: André Erdmann <dywi@mailerd.de> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
37 lines
751 B
Bash
37 lines
751 B
Bash
#!/bin/sh
|
|
#
|
|
# Start & stop the inadyn client
|
|
#
|
|
|
|
CONFIG=/etc/inadyn.conf
|
|
VR_INADYN=/var/run/inadyn
|
|
|
|
# check if CONFIG exists, print message & exit if it doesn't
|
|
[ ! -f $CONFIG ] && ( echo "The config file "$CONFIG" is missing...exiting now." && exit 2 )
|
|
|
|
# check if VR_INADYN exists, create it if not
|
|
[ ! -d $VR_INADYN ] && mkdir -p $VR_INADYN
|
|
|
|
case "$1" in
|
|
start)
|
|
echo "Starting inadyn: "
|
|
start-stop-daemon -S -x /usr/bin/inadyn
|
|
[ $? == 0 ] && echo "OK" || echo "FAIL"
|
|
;;
|
|
stop)
|
|
echo "Stopping inadyn: "
|
|
start-stop-daemon -q -K -x /usr/bin/inadyn
|
|
[ $? == 0 ] && echo "OK" || echo "FAIL"
|
|
rm -f /var/run/inadyn/inadyn.pid
|
|
;;
|
|
restart)
|
|
"$0" stop
|
|
"$0" start
|
|
;;
|
|
*)
|
|
echo "Usage: $0 {start|stop|restart}"
|
|
exit 1
|
|
esac
|
|
|
|
exit $?
|