28 lines
735 B
Text
Executable file
28 lines
735 B
Text
Executable file
#!/sbin/openrc-run
|
|
|
|
name=$RC_SVCNAME
|
|
cfgfile="/etc/qubes/$RC_SVCNAME.conf"
|
|
input="${RC_SVCNAME/*.}"
|
|
svcname="${RC_SVCNAME/.*}."
|
|
type="${RC_SVCNAME%.*}"
|
|
type="${type/$svcname/}"
|
|
type="$(echo $type | sed 's/.*/\u&/')"
|
|
command="/usr/bin/qubes-input-sender"
|
|
command_args="qubes.Input$type /dev/input/$input dom0"
|
|
command_user="root"
|
|
pidfile="/run/qubes/$RC_SVCNAME.pid"
|
|
start_stop_daemon_args=""
|
|
command_background="true"
|
|
output_log="/var/log/qubes/$RC_SVCNAME.log"
|
|
error_log="/var/log/qubes/$RC_SVCNAME.err"
|
|
|
|
start_pre() {
|
|
checkpath --directory --owner $command_user:qubes --mode 0775 \
|
|
/run/qubes \
|
|
/var/log/qubes \
|
|
/var/run/qubes
|
|
}
|
|
|
|
stop_post() {
|
|
pkill -f "input-proxy-sender /dev/input/$input" || true
|
|
}
|