1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-22 00:35:15 +00:00
freebsd-ports/audio/jamulus/files/jamulus-server.in
Yuri Victorovich 5e56a22d71 audio/jamulus: Fix jamulus-server arguments
* allow to override user name for the daemon with jamulus_server_uname
* allow to set server arguments with jamulus_server_args

PR:		260860
Reported by:	Stefan Bethke <stb@lassitu.de>
2022-01-02 23:10:14 -08:00

33 lines
1.1 KiB
Bash

#!/bin/sh
# PROVIDE: jamulus-server
# REQUIRE: DAEMON NETWORKING
# KEYWORD: shutdown
# Add the following lines to /etc/rc.conf to enable jamulus_server:
# jamulus_server_enable : set to "YES" to enable the daemon, default is "NO"
# jamulus_server_uname : user to run jamulus-server as, default is "%%USER%%"
# jamulus_server_flags : extra flags to pass to daemon(8), default is ""
# jamulus_server_args : any arguments to pass to jamulus-server, default is ""
# - list of all possible arguments: https://jamulus.io/wiki/Command-Line-Options
. /etc/rc.subr
name=jamulus_server
rcvar=jamulus_server_enable
load_rc_config $name
jamulus_server_enable=${jamulus_server_enable:-"NO"}
jamulus_server_uname=${jamulus_server_uname:-"%%USER%%"}
jamulus_server_flags=${jamulus_server_flags:-""}
jamulus_server_args=${jamulus_server_args:-""}
logfile="/var/log/${name}.log"
procname=%%PREFIX%%/bin/jamulus-server
command="/usr/sbin/daemon"
command_args="-u ${jamulus_server_uname} -o ${logfile} -t ${name} %%PREFIX%%/bin/jamulus-server -s ${jamulus_server_args}"
run_rc_command "$1"