kumquat-buildroot/package/usbguard/S20usbguard
Kamel Bouhara fbff7d7289 package/usbguard: new package
usbguard is a software framework to implement USB
device blacklisting and whitelisting based on their
attributes.

More info. on: https://usbguard.github.io/

Signed-off-by: Kamel Bouhara <kamel.bouhara@bootlin.com>
Tested-by: Miquel Raynal <miquel.raynal@bootlin.com>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
[Arnout:
 - correct indirect dependencies from protobuf instead of libglib2;
 - say in Config.in help text that rules.conf has to be created]
2021-06-16 23:38:54 +02:00

38 lines
636 B
Bash

#!/bin/sh
#
# Start psplash
#
PIDFILE=/var/run/$NAME.pid
start() {
printf "Starting usbguard daemon: "
test -d /var/log/usbguard || mkdir -p /var/log/usbguard
start-stop-daemon -b -S -q -m -p $PIDFILE --exec /usr/sbin/usbguard-daemon -- -f -s -c /etc/usbguard/usbguard-daemon.conf
[ $? = 0 ] && echo "OK" || echo "FAIL"
}
stop() {
printf "Stopping usbguard daemon: "
start-stop-daemon -K -q -p $PIDFILE
[ $? = 0 ] && echo "OK" || echo "FAIL"
}
case "$1" in
start)
start
;;
stop)
stop
;;
restart|reload)
stop
start
;;
*)
echo "Usage: $0 {start|stop|restart}"
exit 1
esac
exit $?