aboutsummaryrefslogtreecommitdiff
path: root/apks/photoview/photoview.initd
blob: bbc3cda9d5ed8a6c815598d0c0f2884316f0d6ec (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
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
}