24 lines
679 B
Text
24 lines
679 B
Text
#!/sbin/openrc-run
|
|
name="$RC_SVCNAME"
|
|
cfgfile="/etc/conf.d/$RC_SVCNAME"
|
|
pidfile="/var/run/$RC_SVCNAME.pid"
|
|
command="/usr/bin/node server"
|
|
command_args=""
|
|
command_user="wikijs"
|
|
command_group="wikijs"
|
|
supervisor="supervise-daemon"
|
|
start_stop_daemon_args=""
|
|
command_background="yes"
|
|
output_log="/var/log/$RC_SVCNAME/$RC_SVCNAME.log"
|
|
error_log="/var/log/$RC_SVCNAME/$RC_SVCNAME.err"
|
|
working_directory="/usr/lib/bundles/wikijs"
|
|
|
|
start_pre() {
|
|
checkpath --directory --owner $command_user:$command_user --mode 0775 \
|
|
/var/log/$RC_SVCNAME \
|
|
/var/lib/$RC_SVCNAME
|
|
export NODE_ENV=production
|
|
export CONFIG_FILE=/etc/wikijs/config.yml
|
|
cd "$working_directory"
|
|
}
|
|
|