ayaports/user/calibre-web/calibre-web.initd

22 lines
653 B
Text
Raw Permalink Normal View History

2021-06-04 15:24:22 +00:00
#!/sbin/openrc-run
2023-01-10 19:16:39 +00:00
name=$RC_SVCNAME
cfgfile="/etc/conf.d/$RC_SVCNAME"
pidfile="/var/run/$RC_SVCNAME/$RC_SVCNAME.pid"
command="/usr/share/webapps/$RC_SVCNAME/cps.py"
command_args="-p $CALIBREWEB_DB"
command_user="$CALIBREWEB_USER"
command_group="$CALIBREWEB_GROUP"
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"
2021-06-04 15:24:22 +00:00
2023-01-10 19:16:39 +00:00
start_pre() {
checkpath --directory --owner $command_user:$command_group --mode 0775 \
/var/run/$RC_SVCNAME /var/log/$RC_SVCNAME
2021-06-04 15:24:22 +00:00
2023-01-10 19:16:39 +00:00
export CALIBREPORT=$CALIBREWEB_PORT
export CALIBRE_DBPATH=$CALIBREWEB_HOME
2021-06-04 15:24:22 +00:00
}