diff --git a/etc/init.d/laptop-mode b/etc/init.d/laptop-mode index 0cb1cb1..ab89a3e 100644 --- a/etc/init.d/laptop-mode +++ b/etc/init.d/laptop-mode @@ -81,8 +81,20 @@ case $1 in /usr/sbin/laptop_mode status ;; + condrestart|condreload) + if "$0" status >/dev/null; then + exec "$0" restart + fi + ;; + + condstop) + if "$0" status >/dev/null; then + exec "$0" stop + fi + ;; + *) - echo "Usage: $0 {stop|start|restart|reload|force-reload|status}" >&2 + echo "Usage: $0 {stop|start|restart|reload|force-reload|status|condrestart|condreload|condstop}" >&2 exit 2 ;; esac