summaryrefslogtreecommitdiff
path: root/net-misc/omnisync/files/omnisync.initd
blob: c71e63d4d3e38c0e6a18ee1419de83d6b6636a56 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/sbin/openrc-run
# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

depend() {
	use net dns
}

INSTANCE=${SVCNAME#*.}
if [ -n "${INSTANCE}" ] && [ ${SVCNAME} != "omnisync" ]; then
    pidfile="/var/run/omnisync.${INSTANCE}.pid"
else
    pidfile="/var/run/omnisync.pid"
fi

command="/usr/sbin/omnisync"
command_args="-P ${pidfile} -M ${OMNISYNC_MODE} ${OMNISYNC_ARGS}"

start_pre() {
	if [ -z "${OMNISYNC_MODE}" ] ; then
		eerror 'Configuration incomplete! OMNISYNC_MODE not set'
		return 1
	fi
	return 0
}

# vim: filetype=gentoo-init-d sw=2 ts=2 sts=2 noet: