python-dataproperty: bump version to 0.17.0
[buildroot-gz.git] / package / owfs / S30owfs
blobfeed676f8a36a57d73ded2030014b1a14545266b
1 NAME="owfs"
2 DAEMON="/usr/bin/${NAME}"
3 PID_F="/run/${NAME}.pid"
4 OWFS_MOUNTPOINT="/dev/1wire"
5 OWFS_DEVICES="-s localhost:4304"
6 OWFS_ARGS=""
8 [ -r /etc/default/${NAME} ] && . /etc/default/${NAME}
10 case "$1" in
11 start)
12         printf "Starting ${NAME}: "
13         # Fuse may be in a module, so try to load it
14         modprobe -q fuse && printf "[fuse] "
15         mkdir -p ${OWFS_MOUNTPOINT}
16         start-stop-daemon -S -x ${DAEMON} -- \
17                 --pid_file ${PID_F} -m ${OWFS_MOUNTPOINT} ${OWFS_DEVICES} \
18                 ${OWFS_ARGS}
19         [ $? -eq 0 ] && echo "OK" || echo "FAIL"
20         ;;
21 stop)
22         printf "Stopping ${NAME}: "
23         start-stop-daemon -K -p ${PID_F}
24         [ $? -eq 0 ] && echo "OK" || echo "FAIL"
25         ;;
26 restart|reload)
27         $0 stop
28         $0 start
29         ;;
31         echo "Usage: $0 {start|stop|restart|reload}"
32         exit 1
33 esac