mirror of
https://github.com/beard7n/bsdports.git
synced 2026-04-17 22:11:19 +02:00
42 lines
899 B
Bash
42 lines
899 B
Bash
#!/bin/sh
|
|
#
|
|
# PROVIDE: %%APP_NAME%%
|
|
# REQUIRE: LOGIN
|
|
# KEYWORD: shutdown
|
|
|
|
#
|
|
# Add the following lines to /etc/rc.conf to enable the %%APP_NAME%%:
|
|
#
|
|
# %%APP_NAME%%_enable="YES"
|
|
|
|
. /etc/rc.subr
|
|
|
|
name="%%APP_NAME%%"
|
|
rcvar=%%APP_NAME%%_enable
|
|
|
|
load_rc_config "$name"
|
|
|
|
: ${%%APP_NAME%%_enable="NO"}
|
|
: ${%%APP_NAME%%_rundir="%%APP_RUNDIR%%"}
|
|
: ${%%APP_NAME%%_logdir="%%APP_LOGDIR%%"}
|
|
: ${%%APP_NAME%%_cachedir="%%APP_CACHEDIR%%"}
|
|
|
|
procname="ruby"
|
|
command="%%PREFIX%%/bin/%%APP_NAME%%"
|
|
|
|
%%APP_NAME%%_user="%%APP_OWNER%%"
|
|
%%APP_NAME%%_group="%%APP_GROUP%%"
|
|
|
|
pidfile="${%%APP_NAME%%_rundir}/puma.pid"
|
|
|
|
%%APP_NAME%%_precmd() {
|
|
install -d -o %%APP_OWNER%% -g %%APP_GROUP%% ${%%APP_NAME%%_rundir}
|
|
install -d -o %%APP_OWNER%% -g %%APP_GROUP%% ${%%APP_NAME%%_logdir}
|
|
install -d -o %%APP_OWNER%% -g %%APP_GROUP%% ${%%APP_NAME%%_cachedir}
|
|
}
|
|
|
|
start_precmd="%%APP_NAME%%_precmd"
|
|
|
|
run_rc_command "$1"
|
|
#EOF
|