25 lines
664 B
Text
25 lines
664 B
Text
#!/sbin/openrc-run
|
|
|
|
name="$RC_SVCNAME"
|
|
cfgfile="/etc/conf.d/$RC_SVCNAME.conf"
|
|
pidfile="/var/run/$RC_SVCNAME.pid"
|
|
command="celery"
|
|
command_args="--app paperless worker --loglevel INFO"
|
|
command_user="paperless"
|
|
command_group="paperless"
|
|
working_directory="/usr/share/webapps/paperless/src"
|
|
start_stop_daemon_args=""
|
|
command_background="yes"
|
|
output_log="/var/log/paperless/$RC_SVCNAME.log"
|
|
error_log="/var/log/paperless/$RC_SVCNAME.err"
|
|
|
|
depend() {
|
|
need redis
|
|
}
|
|
|
|
start_pre() {
|
|
cd "$working_directory"
|
|
checkpath --directory --owner $command_user:$command_group --mode 0775 \
|
|
/var/log/paperless \
|
|
/var/lib/paperless
|
|
}
|