apkbuilds @ 506249ae1f0e2819b3decf096186294bed7a1fd4

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