apkbuilds @ 0b58e2bbe81290d43b0fa75d7d515d4155f4f139

 1#!/sbin/openrc-run
 2supervisor="supervise-daemon"
 3
 4name="reddit-nextcloud-importer"
 5command="/usr/bin/reddit-nextcloud-importer"
 6command_args="-c ${client_id}
 7        -s ${client_secret}
 8        -u ${reddit_username}
 9        -p ${reddit_password}
10        -P ${nextcloud_password}
11        -U ${nextcloud_username}
12        -o ${nextcloud_host}
13        "
14command_background="yes"
15
16supervise_daemon_args="--user $cmd_user -d $tmp_dir"
17pidfile="/run/$RC_SVCNAME.pid"
18output_log="$logfile"
19error_log="$logfile"
20
21start_pre() {
22	if [ "$logfile" ]; then
23		checkpath --file --mode 0640 --owner "cmd_user" "$logfile" || return 1
24	fi
25	checkpath --directory --owner "$cmd_user" --mode 0775  "$tmp_dir" || return 1
26}
27
28depend() {
29	use net
30}