#!/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 $? }