comparison debian/dropbear.init @ 524:3c3cef8a32e6 maemo

- Make it do the postinst files etc for dropbear-server - Improve the NO_START message
author Matt Johnston <matt@ucc.asn.au>
date Tue, 18 Nov 2008 23:15:24 +0000
parents 8c2d2edadf2a
children
comparison
equal deleted inserted replaced
523:4ff1bf0345c9 524:3c3cef8a32e6
36 test -n "$DROPBEAR_RECEIVE_WINDOW" || \ 36 test -n "$DROPBEAR_RECEIVE_WINDOW" || \
37 DROPBEAR_RECEIVE_WINDOW="65536" 37 DROPBEAR_RECEIVE_WINDOW="65536"
38 38
39 case "$1" in 39 case "$1" in
40 start) 40 start)
41 test "$NO_START" = "0" || cancel 'NO_START is not set to zero.' 41 test "$NO_START" = "0" || cancel '/etc/default/dropbear NO_START is set, Dropbear will not run.'
42 echo -n "Starting $DESC: " 42 echo -n "Starting $DESC: "
43 start-stop-daemon --start --quiet --pidfile /var/run/"$NAME".pid \ 43 start-stop-daemon --start --quiet --pidfile /var/run/"$NAME".pid \
44 --exec "$DAEMON" -- -d "$DROPBEAR_DSSKEY" -r "$DROPBEAR_RSAKEY" \ 44 --exec "$DAEMON" -- -d "$DROPBEAR_DSSKEY" -r "$DROPBEAR_RSAKEY" \
45 -p "$DROPBEAR_PORT" -W "$DROPBEAR_RECEIVE_WINDOW" $DROPBEAR_EXTRA_ARGS 45 -p "$DROPBEAR_PORT" -W "$DROPBEAR_RECEIVE_WINDOW" $DROPBEAR_EXTRA_ARGS
46 echo "$NAME." 46 echo "$NAME."
49 echo -n "Stopping $DESC: " 49 echo -n "Stopping $DESC: "
50 start-stop-daemon --stop --quiet --oknodo --pidfile /var/run/"$NAME".pid 50 start-stop-daemon --stop --quiet --oknodo --pidfile /var/run/"$NAME".pid
51 echo "$NAME." 51 echo "$NAME."
52 ;; 52 ;;
53 restart|force-reload) 53 restart|force-reload)
54 test "$NO_START" = "0" || cancel 'NO_START is not set to zero.' 54 test "$NO_START" = "0" || cancel '/etc/default/dropbear NO_START is set, Dropbear will not run.'
55 echo -n "Restarting $DESC: " 55 echo -n "Restarting $DESC: "
56 start-stop-daemon --stop --quiet --oknodo --pidfile /var/run/"$NAME".pid 56 start-stop-daemon --stop --quiet --oknodo --pidfile /var/run/"$NAME".pid
57 sleep 1 57 sleep 1
58 start-stop-daemon --start --quiet --pidfile /var/run/"$NAME".pid \ 58 start-stop-daemon --start --quiet --pidfile /var/run/"$NAME".pid \
59 --exec "$DAEMON" -- -d "$DROPBEAR_DSSKEY" -r "$DROPBEAR_RSAKEY" \ 59 --exec "$DAEMON" -- -d "$DROPBEAR_DSSKEY" -r "$DROPBEAR_RSAKEY" \