gentoo-overlay/app-admin/usbguard/files/usbguard
madmaurice c456222e30 Add app-admin/usbguard
usbguard is a USB firewall, which can prevent BadUSB attacks.
2019-07-07 22:28:34 +02:00

28 lines
624 B
Plaintext

#!/sbin/openrc-run
command="/usr/sbin/usbguard-daemon"
command_args="-s -f -c /etc/usbguard/usbguard-daemon.conf ${usbguard_args}"
pidfile="/var/run/usbguard.pid"
name="USBGuard Daemon"
description="Software framework for implementing USB device authorization policaies"
depend() {
need udev
}
start() {
ebegin "Starting $name"
start-stop-daemon --start --exec $command \
--pidfile $pidfile \
-- $command_args
eend $?
}
stop() {
ebegin "Stopping $name"
start-stop-daemon --stop --exec $command \
--pidfile $pidfile
eend $?
}