apkbuilds @ 3a981c0912f4e229e5a11c97230d2f57d1f01c3c

 1#!/sbin/openrc-run
 2supervisor=supervise-daemon
 3
 4command="/usr/bin/photoview"
 5command_background="yes"
 6: ${command_user:="photoview:photoview"}
 7
 8# database
 9export PHOTOVIEW_DATABASE_DRIVER
10export PHOTOVIEW_SQLITE_PATH
11export PHOTOVIEW_MYSQL_URL
12export PHOTOVIEW_POSTGRES_URL
13
14export PHOTOVIEW_LISTEN_IP
15export PHOTOVIEW_LISTEN_PORT
16export PHOTOVIEW_SERVE_UI
17export PHOTOVIEW_UI_PATH
18export PHOTOVIEW_MEDIA_CACHE
19
20# features
21export PHOTOVIEW_DISABLE_FACE_RECOGNITION
22export PHOTOVIEW_DISABLE_VIDEO_ENCODING
23export PHOTOVIEW_DISABLE_RAW_PROCESSING
24
25logdir="/var/log/photoview"
26error_log="$logdir/${SVCNAME}.log"
27pidfile="/var/run/${SVCNAME}.pid"
28
29depend() {
30	need net
31	after firewall
32}
33
34start_pre() {
35    checkpath -d -o $command_user -m755 $logdir
36    checkpath -d -o $command_user -m755 /var/cache/photoview/media_cache
37    checkpath -d -o $command_user -m755 /var/lib/photoview
38    checkpath -d -o $command_user -m755 /usr/share/webapps/photoview
39    checkpath -f -o $command_user -m644 $error_log
40}