#!/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 }