aboutsummaryrefslogtreecommitdiffstats
path: root/testing/oidentd/oidentd.initd
diff options
context:
space:
mode:
authorCarlo Landmeter <clandmeter@gmail.com>2009-01-28 08:22:52 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2009-01-28 08:54:00 +0000
commit4742ffc955a9db4df026db4a65346714d872f5b3 (patch)
treec09565c5ced9bcfb4ef0b12a781f4fae55dbebbf /testing/oidentd/oidentd.initd
parent7cebf0b6672c6089257011039dcf78a3816c2f9e (diff)
downloadaports-4742ffc955a9db4df026db4a65346714d872f5b3.tar.bz2
aports-4742ffc955a9db4df026db4a65346714d872f5b3.tar.xz
testing/oidentd: new aport
Diffstat (limited to 'testing/oidentd/oidentd.initd')
-rw-r--r--testing/oidentd/oidentd.initd42
1 files changed, 42 insertions, 0 deletions
diff --git a/testing/oidentd/oidentd.initd b/testing/oidentd/oidentd.initd
new file mode 100644
index 0000000000..c40b058dac
--- /dev/null
+++ b/testing/oidentd/oidentd.initd
@@ -0,0 +1,42 @@
+#!/sbin/runscript
+# 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
+}
+
+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
+}
+
+
+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 $?
+}
+
+stop() {
+ ebegin "Stopping oidentd"
+ start-stop-daemon --stop --quiet --exec /usr/sbin/oidentd
+ eend $?
+}
+