diff options
author | Gabriel Arakaki Giovanini <mail@gabrielgio.me> | 2022-10-16 23:04:48 +0000 |
---|---|---|
committer | Gabriel Arakaki Giovanini <mail@gabrielgio.me> | 2022-10-16 23:04:48 +0000 |
commit | 0204e511bd3a183291c0582d51ee0f0c177754ec (patch) | |
tree | 057e1b55098acc1c5b42e15ecc23cc68c9221cc9 /apks | |
parent | 595e07ac484ea0beb0066e7e2ad74f4137083748 (diff) | |
download | apkbuilds-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')
-rw-r--r-- | apks/reddit-nextcloud-importer/APKBUILD | 4 | ||||
-rw-r--r-- | apks/reddit-nextcloud-importer/reddit-nextcloud-importer.confd | 4 | ||||
-rw-r--r-- | apks/reddit-nextcloud-importer/reddit-nextcloud-importer.initd | 19 |
3 files changed, 22 insertions, 5 deletions
diff --git a/apks/reddit-nextcloud-importer/APKBUILD b/apks/reddit-nextcloud-importer/APKBUILD index d125f82..b237645 100644 --- a/apks/reddit-nextcloud-importer/APKBUILD +++ b/apks/reddit-nextcloud-importer/APKBUILD @@ -45,6 +45,6 @@ package() { sha512sums=" aa4274d5b904c15bf262e59fbc50de58d414f660b3e3214cd44ebab0aa2f80ed890ed5bb9190df555118d8dbec81e41553816fcffc3fe1770f347c394501910d reddit-nextcloud-importer-0.1.2.tar.gz -718c5997338db00418c3070007c38c8fad1743e8e17e5ef3e7d25d2d40ae9474bd51edd450b854e588595cc62502a18aaa7945a2b8227a5480bb2f805a1bda1a reddit-nextcloud-importer.initd -83695d870b1a5d6d914c268001084ba5a4a65842b5ee8243736a45810822bc493af1990a6a5ca71dfd623f932388824edb5dced8f4fefadc95c55d1513e0db93 reddit-nextcloud-importer.confd +b7960ee63d10c792fb3302f6f84fa23975dfb1d24a85249ff612c289126297f605bc4203b28eff7f94aefb6729593d4fc22bdb78d398d7e4445f22f2b78175a0 reddit-nextcloud-importer.initd +8e400cd0ac302b8cade98db5aea8afd109e7d5d434281238997c1e3f0b779322ecade95a26fde5860a3846b8d9687cca95df1c1b5ee0b489d6782bf6c2680666 reddit-nextcloud-importer.confd " diff --git a/apks/reddit-nextcloud-importer/reddit-nextcloud-importer.confd b/apks/reddit-nextcloud-importer/reddit-nextcloud-importer.confd index d418812..c79d1bf 100644 --- a/apks/reddit-nextcloud-importer/reddit-nextcloud-importer.confd +++ b/apks/reddit-nextcloud-importer/reddit-nextcloud-importer.confd @@ -5,6 +5,10 @@ reddit_password="" nextcloud_host="" nextcloud_username="" nextcloud_password="" +tmp_dir="/tmp/$RC_SVCNAME/" + +# for my local set I use www-data for most of my service. Change it to fit yours +cmd_user="www-data:www-data" # File to redirect stdout/stderr into. Set to empty string to disable. #logfile="/var/log/$RC_SVCNAME.log" 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 } - |