mirror of
https://git.freebsd.org/ports.git
synced 2025-06-14 17:20:29 -04:00
- Switch to using upstream Makefile - Add rc.d script - Specify a user/group - Purge patches which don't apply anymore PR: 271388
32 lines
751 B
Bash
32 lines
751 B
Bash
#!/bin/sh
|
|
#
|
|
|
|
# PROVIDE: soju
|
|
# REQUIRE: LOGIN
|
|
# KEYWORD: shutdown
|
|
#
|
|
# Add these lines to /etc/rc.conf.local or /etc/rc.conf
|
|
# to enable this service:
|
|
#
|
|
# soju_enable (bool): Set to NO by default.
|
|
# Set it to YES to enable soju.
|
|
# soju_config (path): Set to %%PREFIX%%/etc/soju/config
|
|
# by default.
|
|
|
|
. /etc/rc.subr
|
|
|
|
name="soju"
|
|
rcvar=soju_enable
|
|
desc="Soju IRC bouncer"
|
|
|
|
: ${soju_enable:=NO}
|
|
: ${soju_config:=%%PREFIX%%/etc/soju/config}
|
|
|
|
command=/usr/sbin/daemon
|
|
procname="%%PREFIX%%/bin/soju"
|
|
pidfile=/var/run/${name}.pid
|
|
command_args="-P /var/run/daemon_${name}.pid -p $pidfile -u %%USER%% -H -c -f $procname -config ${soju_config}"
|
|
start_precmd="mkdir -p /var/run/soju && chown %%USER%%: /var/run/soju"
|
|
|
|
load_rc_config $name
|
|
run_rc_command "$1"
|