aboutsummaryrefslogtreecommitdiffstats
path: root/main/oidentd/oidentd.initd
diff options
context:
space:
mode:
authorJakub Jirutka <jakub@jirutka.cz>2018-05-15 22:28:31 +0200
committerJakub Jirutka <jakub@jirutka.cz>2018-05-15 22:32:16 +0200
commit47c81f33217bdd39084e1cfd784642122015a19c (patch)
tree5c375d3ea85b8e02a47b94e2fe9adcfa8675ebe1 /main/oidentd/oidentd.initd
parentea1688d74a29f37292b237eddeb48928395d3a23 (diff)
downloadaports-47c81f33217bdd39084e1cfd784642122015a19c.tar.bz2
aports-47c81f33217bdd39084e1cfd784642122015a19c.tar.xz
main/oidentd: rewrite init script
Diffstat (limited to 'main/oidentd/oidentd.initd')
-rw-r--r--main/oidentd/oidentd.initd54
1 files changed, 17 insertions, 37 deletions
diff --git a/main/oidentd/oidentd.initd b/main/oidentd/oidentd.initd
index bd60872a3a..a1a880ba97 100644
--- a/main/oidentd/oidentd.initd
+++ b/main/oidentd/oidentd.initd
@@ -1,43 +1,23 @@
#!/sbin/openrc-run
-# Copyright 1999-2004 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/www/viewcvs.gentoo.org/raw_cvs/gentoo-x86/net-misc/oidentd/files/oidentd-2.0.7-init,v 1.4 2007/10/24 11:38:14 uberlord Exp $
-depend() {
- need net
- after firewall
-}
-
-check_config() {
- if [ -z "${USER}" ]
- then
- eerror "Please set \$USER in /etc/conf.d/oidentd!"
- return 1
- fi
- if [ -z "${GROUP}" ]
- then
- eerror "Please set \$GROUP in /etc/conf.d/oidentd!"
- return 1
- fi
-
- if [ "$(sysctl -n security.bsd.see_other_uids 2>/dev/null)" = "0" ]; then
- eerror "${SVCNAME} cannot work if the sysctl security.bsd.see_other_uids is 0"
- return 1
- fi
-}
+# Upper case variables are for backward compatibility only.
+: ${cfgfile:="/etc/oidentd.conf"}
+: ${user:=${USER:-"nobody"}}
+: ${group:=${GROUP:-"nobody"}}
+command="/usr/sbin/oidentd"
+command_args="
+ --foreground
+ --config $cfgfile
+ --user $user
+ --group $group
+ ${command_args:-$OPTIONS}"
+command_background="yes"
+pidfile="/run/$RC_SVCNAME.pid"
-start() {
- check_config || return 1
- ebegin "Starting oidentd"
- OPTIONS="${OPTIONS} -u ${USER} -g ${GROUP}"
- start-stop-daemon --start --quiet --exec /usr/sbin/oidentd -- $OPTIONS
- eend $?
-}
+required_files="$cfgfile"
-stop() {
- ebegin "Stopping oidentd"
- start-stop-daemon --stop --quiet --exec /usr/sbin/oidentd
- eend $?
+depend() {
+ need net
+ after firewall
}
-