2022-08-15 15:51:38 +00:00
|
|
|
#!/sbin/openrc-run
|
|
|
|
|
|
|
|
name="$RC_SVCNAME"
|
|
|
|
cfgfile="/etc/conf.d/$RC_SVCNAME.conf"
|
|
|
|
pidfile="/var/run/$RC_SVCNAME.pid"
|
2023-06-14 02:12:39 +00:00
|
|
|
command="celery"
|
|
|
|
command_args="--app paperless beat --loglevel INFO"
|
2022-08-15 15:51:38 +00:00
|
|
|
command_user="paperless"
|
|
|
|
command_group="paperless"
|
2023-06-14 02:12:39 +00:00
|
|
|
working_directory="/usr/share/webapps/paperless/src"
|
2022-08-15 15:51:38 +00:00
|
|
|
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() {
|
2023-06-14 02:12:39 +00:00
|
|
|
cd "$working_directory"
|
2022-08-15 15:51:38 +00:00
|
|
|
checkpath --directory --owner $command_user:$command_group --mode 0775 \
|
|
|
|
/var/log/paperless \
|
|
|
|
/var/lib/paperless
|
|
|
|
}
|