From 305a28490edf324cdd954125e4287ec2d126b6f3 Mon Sep 17 00:00:00 2001 From: Anis Abdollahi-Sissan <73657699+3dde@users.noreply.github.com> Date: Wed, 21 Feb 2024 10:04:09 +0000 Subject: [PATCH] Add OpenRC template to README.md --- README.md | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/README.md b/README.md index cd73b8ba..f08e4571 100644 --- a/README.md +++ b/README.md @@ -365,6 +365,33 @@ client_body_buffer_size 1M; Plik session cookies have the "secure" flag set when EnhancedWebSecurity is set so they can only be transmitted over secure HTTPS connections. +* Is there an OpenRC template for running plik as a service? + +Yes (the plikuser has to be created): + +``` +#!/sbin/openrc-run + +name=$RC_SVCNAME +description="Plik File Sharing Service" +command="/path/to/plik/server/plikd" +command_user="plikuser:plikuser" +command_background=true +directory="/path/to/plik/server" +pidfile=/run/${RC_SVCNAME}.pid +start_stop_daemon_args="--stdout /var/log/$RC_SVCNAME/${RC_SVCNAME}.log --stderr /var/log/$RC_SVCNAME/${RC_SVCNAME}.log" + +depend() { + use logger dns + need net + after firewall +} + +start_pre() { + checkpath --directory --owner $command_user --mode 0775 /var/log/$RC_SVCNAME +} +``` + * Build failure "/usr/bin/env: ‘node’: No such file or directory" Debian users might need to install the nodejs-legacy package.