aboutsummaryrefslogtreecommitdiff
path: root/apks/reddit-nextcloud-importer/reddit-nextcloud-importer.initd
diff options
context:
space:
mode:
authorGabriel Arakaki Giovanini <mail@gabrielgio.me>2022-10-16 23:04:48 +0000
committerGabriel Arakaki Giovanini <mail@gabrielgio.me>2022-10-16 23:04:48 +0000
commit0204e511bd3a183291c0582d51ee0f0c177754ec (patch)
tree057e1b55098acc1c5b42e15ecc23cc68c9221cc9 /apks/reddit-nextcloud-importer/reddit-nextcloud-importer.initd
parent595e07ac484ea0beb0066e7e2ad74f4137083748 (diff)
downloadapkbuilds-0204e511bd3a183291c0582d51ee0f0c177754ec.tar.gz
apkbuilds-0204e511bd3a183291c0582d51ee0f0c177754ec.tar.bz2
apkbuilds-0204e511bd3a183291c0582d51ee0f0c177754ec.zip
ref: Update openrc files
Cleaning up the initd and confd files to make easier to setup and run multi service.
Diffstat (limited to 'apks/reddit-nextcloud-importer/reddit-nextcloud-importer.initd')
-rw-r--r--apks/reddit-nextcloud-importer/reddit-nextcloud-importer.initd19
1 files changed, 16 insertions, 3 deletions
diff --git a/apks/reddit-nextcloud-importer/reddit-nextcloud-importer.initd b/apks/reddit-nextcloud-importer/reddit-nextcloud-importer.initd
index 7b48eeb..9beed1f 100644
--- a/apks/reddit-nextcloud-importer/reddit-nextcloud-importer.initd
+++ b/apks/reddit-nextcloud-importer/reddit-nextcloud-importer.initd
@@ -3,15 +3,28 @@ supervisor="supervise-daemon"
name="reddit-nextcloud-importer"
command="/usr/bin/reddit-nextcloud-importer"
-command_args=" -c ${client_id} -s ${client_secret} -u ${reddit_username} -p ${reddit_password} -P ${nextcloud_password} -U ${nextcloud_username} -o ${nextcloud_host}"
+command_args="-c ${client_id}
+ -s ${client_secret}
+ -u ${reddit_username}
+ -p ${reddit_password}
+ -P ${nextcloud_password}
+ -U ${nextcloud_username}
+ -o ${nextcloud_host}
+ "
command_background="yes"
-supervise_daemon_args="--user www-data:www-data"
+supervise_daemon_args="--user $cmd_user -d $tmp_dir"
pidfile="/run/$RC_SVCNAME.pid"
output_log="$logfile"
error_log="$logfile"
+start_pre() {
+ if [ "$logfile" ]; then
+ checkpath --file --mode 0640 --owner "cmd_user" "$logfile" || return 1
+ fi
+ checkpath --directory --owner "$cmd_user" --mode 0775 "$tmp_dir" || return 1
+}
+
depend() {
use net
}
-