diff options
Diffstat (limited to 'apks/photoview/photoview.initd')
-rw-r--r-- | apks/photoview/photoview.initd | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/apks/photoview/photoview.initd b/apks/photoview/photoview.initd new file mode 100644 index 0000000..04a799c --- /dev/null +++ b/apks/photoview/photoview.initd @@ -0,0 +1,40 @@ +#!/sbin/openrc-run +supervisor=supervise-daemon + +command="/usr/bin/photoview" +command_background="yes" +command_user="photoview:photoview" + +# database +export PHOTOVIEW_DATABASE_DRIVER +export PHOTOVIEW_SQLITE_PATH +export PHOTOVIEW_MYSQL_URL +export PHOTOVIEW_POSTGRES_URL + +export PHOTOVIEW_LISTEN_IP +export PHOTOVIEW_LISTEN_PORT +export PHOTOVIEW_SERVE_UI +export PHOTOVIEW_UI_PATH +export PHOTOVIEW_MEDIA_CACHE + +# features +export PHOTOVIEW_DISABLE_FACE_RECOGNITION +export PHOTOVIEW_DISABLE_VIDEO_ENCODING +export PHOTOVIEW_DISABLE_RAW_PROCESSING + +logdir="/var/log/photoview" +error_log="$logdir/${SVCNAME}.log" +pidfile="/var/run/${SVCNAME}.pid" + +depend() { + need net + after firewall +} + +start_pre() { + checkpath -d -o $command_user -m755 $logdir + checkpath -d -o $command_user -m755 /var/cache/photoview/media_cache + checkpath -d -o $command_user -m755 /var/lib/photoview + checkpath -d -o $command_user -m755 /usr/share/webapps/photoview + checkpath -f -o $command_user -m644 $error_log +} |