mirror of
https://notabug.org/Sages-of-Gensokyo/gensokyo_kappa-overlay
synced 2025-01-19 09:11:14 +01:00
30 lines
766 B
Plaintext
30 lines
766 B
Plaintext
|
#!/sbin/openrc-run
|
||
|
|
||
|
depend() {
|
||
|
need localmount
|
||
|
after consolekit
|
||
|
after bootmisc
|
||
|
use logger
|
||
|
provide usb-access-control
|
||
|
provide usbguard
|
||
|
}
|
||
|
|
||
|
start_pre() {
|
||
|
ebegin "Pre-start security checks for usbguard"
|
||
|
checkpath --directory --owner root:root /etc/usbguard/
|
||
|
checkpath --file --owner root:root --mode 0600 /etc/usbguard/usbguard-daemon.conf /etc/usbguard/rules.conf
|
||
|
eend $?
|
||
|
}
|
||
|
|
||
|
start() {
|
||
|
ebegin "Starting usbguard daemon"
|
||
|
start-stop-daemon --start --pidfile /var/run/usbguard.pid --exec /usr/sbin/usbguard-daemon -- -f -s -K $APPEND
|
||
|
eend $?
|
||
|
}
|
||
|
|
||
|
stop() {
|
||
|
ebegin "Stopping usbguard daemon"
|
||
|
start-stop-daemon --stop --pidfile /var/run/usbguard.pid --exec /usr/sbin/usbguard-daemon -- -f -s -K $APPEND
|
||
|
eend $?
|
||
|
}
|