From: Alexander Schaefer Date: Thu, 10 Mar 2016 20:45:20 +0000 (+0100) Subject: Add script that allows to start pigpiod as a service. X-Git-Tag: archive/raspbian/1.68-2+rpi1~88^2~2 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=56d28cc80d20b0ca064e54e13ccb81c9d438626f;p=pigpio.git Add script that allows to start pigpiod as a service. --- diff --git a/util/pigpiod b/util/pigpiod new file mode 100755 index 0000000..59ba142 --- /dev/null +++ b/util/pigpiod @@ -0,0 +1,31 @@ +#!/bin/sh +### BEGIN INIT INFO +# Provides: pigpiod +# Required-Start: +# Required-Stop: +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: pigpio daemon +# Description: pigpio daemon required to control GPIO pins via pigpio $ +### END INIT INFO + +# Actions +case "$1" in + start) + pigpiod + ;; + stop) + pkill pigpiod + ;; + restart) + pkill pigpiod + pigpiod + ;; + *) + echo "Usage: $0 start" >&2 + exit 3 + ;; +esac + +exit 0 +