aboutsummaryrefslogtreecommitdiff
path: root/apks/photoview/photoview.initd
diff options
context:
space:
mode:
authorGabriel Arakaki Giovanini <mail@gabrielgio.me>2023-03-10 21:53:09 +0100
committerGabriel Arakaki Giovanini <mail@gabrielgio.me>2023-03-20 18:14:44 +0100
commite89c3ae528d667a63b9716653f9f926bf416f2ee (patch)
tree9c60bbc9f62f87b2f997ac46573d80ab482fa6ad /apks/photoview/photoview.initd
parent2a53753fc4006af8456c282edf88aad35fce52c7 (diff)
downloadapkbuilds-e89c3ae528d667a63b9716653f9f926bf416f2ee.tar.gz
apkbuilds-e89c3ae528d667a63b9716653f9f926bf416f2ee.tar.bz2
apkbuilds-e89c3ae528d667a63b9716653f9f926bf416f2ee.zip
feat: add initial photoview APKBUILD
Diffstat (limited to 'apks/photoview/photoview.initd')
-rw-r--r--apks/photoview/photoview.initd40
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
+}