mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Add support for systemd environments and use it to support Fedora 16
https://fedorahosted.org/freeipa/ticket/1192
This commit is contained in:
committed by
Martin Kosek
parent
f098b213eb
commit
25d5d7ed93
40
init/SystemV/ipa.init
Normal file
40
init/SystemV/ipa.init
Normal file
@@ -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
|
||||
14
init/systemd/ipa.service
Normal file
14
init/systemd/ipa.service
Normal file
@@ -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
|
||||
Reference in New Issue
Block a user