/usr/sbin/debian-edu-restart-services is in debian-edu-config 1.818+deb8u2.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
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 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 | #!/bin/sh
#
# Restart the daemons which might have changed the configuration
# during install
set -e
echo "info: Stopping services in sequence."
for ALL in /etc/rc1.d/K* ; do
if [ -h $ALL ] ; then
SERVICE=$(basename $(readlink $ALL))
else
SERVICE=$(basename $ALL)
fi
echo "info: Stopping $SERVICE"
$ALL stop || /bin/true
done
for service in \
slapd \
rpcbind \
apache \
;
do
if [ "$(pidof $service)" ] ; then
echo "info: '$service' still running, sending HUP."
pkill $service || /bin/true
fi
done
echo "info: Checking what's still running"
ps aux | while read LINE ; do
echo "info: $LINE"
done
for service in \
slapd \
rpcbind \
apache \
;
do
if [ "$(pidof $service)" ] ; then
echo "info: '$service' still running, sending KILL."
pkill -9 $service || /bin/true
fi
done
echo "info: Checking what's still running"
ps aux | while read LINE ; do
echo "info: $LINE"
done
echo "Info: Restarting networking"
/etc/init.d/networking restart || /bin/true
echo "info: Starting services in sequence."
for ALL in /etc/rc2.d/S* ; do
if [ -h $ALL ] ; then
SERVICE=$(basename $(readlink $ALL))
else
SERVICE=$(basename $ALL)
fi
if [ "$SERVICE" = "kdm" ] ; then
if [ -f /etc/inittab.real ] ; then
echo "info: Skipping start of $SERVICE, inittab.real still exists"
continue
fi
fi
echo "info: Starting $SERVICE"
$ALL start || /bin/true
done
exit 0
|