diff options
author | Alexander Bokovoy <abokovoy@redhat.com> | 2011-10-10 15:25:15 +0300 |
---|---|---|
committer | Alexander Bokovoy <abokovoy@redhat.com> | 2011-10-24 10:36:57 +0300 |
commit | 3eeac76b3b061c798a1d0e101c197cc78489d5e7 (patch) | |
tree | 585825bd290a15428336ae1594b0aad1f6ee0de2 /init | |
parent | 7bde6a7da90dfc5f8953736f27cf9e17e82d14f2 (diff) | |
download | freeipa-3eeac76b3b061c798a1d0e101c197cc78489d5e7.tar.gz freeipa-3eeac76b3b061c798a1d0e101c197cc78489d5e7.tar.xz freeipa-3eeac76b3b061c798a1d0e101c197cc78489d5e7.zip |
Add support for systemd environments and use it to support Fedora 16
https://fedorahosted.org/freeipa/ticket/1192
Diffstat (limited to 'init')
-rw-r--r-- | init/SystemV/ipa.init | 40 | ||||
-rw-r--r-- | init/systemd/ipa.service | 14 | ||||
-rw-r--r-- | init/systemd/ipa_kpasswd.service | 10 |
3 files changed, 64 insertions, 0 deletions
diff --git a/init/SystemV/ipa.init b/init/SystemV/ipa.init new file mode 100644 index 000000000..ead7df008 --- /dev/null +++ b/init/SystemV/ipa.init @@ -0,0 +1,40 @@ +#!/bin/sh +# +# ipa This starts and stops ipa controlled daemons +# +# chkconfig: - 21 79 +# description: IPA Server +# configdir: /etc/ipa/ +# + +export SYSTEMCTL_SKIP_REDIRECT=1 + +# Source function library. +if [ -f /etc/rc.d/init.d/functions ] ; then +. /etc/rc.d/init.d/functions +fi +# Source networking configuration. +if [ -f /etc/sysconfig/network ] ; then +. /etc/sysconfig/network +fi + +# Check that networking is up. +if [ "${NETWORKING}" = "no" ] +then + echo "Networking is down" + exit 0 +fi + +case "$1" in + start|stop|restart|status) + /usr/sbin/ipactl $1 + ;; + condrestart) + /sbin/service dirsrv status + RETVAL=$? + [ $RETVAL = 0 ] && /usr/sbin/ipactl restart + ;; + *) + echo "Usage: $0 {start|stop|status|restart|condrestart}" + exit 2 +esac diff --git a/init/systemd/ipa.service b/init/systemd/ipa.service new file mode 100644 index 000000000..ba27d1dfd --- /dev/null +++ b/init/systemd/ipa.service @@ -0,0 +1,14 @@ +[Unit] +Description=Identity, Policy, Audit +Requires=syslog.target network.target +After=syslog.target network.target + +[Service] +Type=oneshot +ExecStart=/usr/sbin/ipactl start +ExecStop=/usr/sbin/ipactl stop +RemainAfterExit=yes +TimeoutSec=0 + +[Install] +WantedBy=multi-user.target diff --git a/init/systemd/ipa_kpasswd.service b/init/systemd/ipa_kpasswd.service new file mode 100644 index 000000000..17aa4633b --- /dev/null +++ b/init/systemd/ipa_kpasswd.service @@ -0,0 +1,10 @@ +[Unit] +Description=IPA Kerberos password service +Requires=krb5kdc.service +Wants=krb5kdc.service + +[Service] +Type=forking +PIDFile=/var/run/ipa_kpasswd.pid +ExecStart=/usr/sbin/ipa_kpasswd + |