add user service files for unified-remote

This commit is contained in:
2026-03-14 18:20:27 +01:00
parent 0f143662ed
commit 4566672bee
7 changed files with 106 additions and 2 deletions
+29
View File
@@ -0,0 +1,29 @@
#!/sbin/openrc-run
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License, v2 or later
command="/opt/urserver/urserver-start"
command_stop="/opt/urserver/urserver-stop"
command_env="PID_PATH=${URSERVER_PID} REMOTES_PATH=${REMOTES_PATH}"
command_args=""
[[ $NO_COPY == "true" ]] && command_args+=" --no-copy"
[[ $NO_MANAGER == "true" ]] && command_args+=" --no-manager"
[[ $NO_NOTIFY == "true" ]] && command_args+=" --no-notify"
pidfile="${URSERVER_PID}"
start_pre() {
echo ${URSERVER_PID}
}
start() {
ebegin "Starting unified-remote server"
env ${command_env} ${command} ${command_args[@]}
eend $?
}
stop() {
ebegin "Stopping unified-remote server"
env ${command_env} ${command_stop} ${command_args[@]}
eend $?
}