wiki/translated_sandbox/hi3536dv100/etc/init.d/S96gpio_monitor

19 lines
304 B
Bash

#!/bin/sh
#
# Start gpio monitor
#
case "$1" in
start)
echo "Starting gpio_monitor daemon..."
/root/gpio_monitor.sh &
;;
stop)
echo "Stopping gpio_monitor daemon..."
kill -9 $(pidof {exe} ash /root/gpio_monitor.sh)
;;
*)
echo "Usage: $0 {start|stop}"
exit 1
esac