apkbuilds @ 188630684d5d3f5ca8f7f58afa523580aa7d1314

 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}