summaryrefslogtreecommitdiff
path: root/net-p2p/automatic/files/automatic.initd
blob: e299d52876aada5eaa70ba250d5b94f2d05ca073 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/sbin/openrc-run
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

command="/usr/bin/automatic"
command_args="${OPTS} ${CONFIG}"
description="RSS downloader"
name="RSS downloader"
user="${AUTOMATIC_USER:-automatic}"
group="${AUTOMATIC_GROUP:-automatic}"
pidfile="/run/${RC_SVCNAME}.pid"

depend() {
	need net
}

start_post() {
	pgrep -n "${RC_SVCNAME%%.*}" > "${pidfile}"
}