16
14
ln -s /etc/service $i
19
# upgrade from unofficial daemontools-run
20
if grep -q '#-- daemontools-run begin' /etc/inittab; then
21
echo 'Removing SV inittab entry...'
22
rm -f /etc/inittab'{new}'
23
sed -e '/#-- daemontools-run begin/,/#-- daemontools-run end/d' \
24
/etc/inittab > /etc/inittab'{new}'
25
mv -f /etc/inittab'{new}' /etc/inittab
29
# update from daemontools-installer
30
if grep -q 'SV:123456:respawn:/command/svscanboot' /etc/inittab; then
31
echo 'Removing SV inittab entry...'
32
rm -f /etc/inittab'{new}'
33
sed -e '/SV:123456:respawn:\/command\/svscanboot/d' \
34
/etc/inittab > /etc/inittab'{new}'
35
mv -f /etc/inittab'{new}' /etc/inittab
39
# update from daemontools-installer (fhs version)
40
if grep -q 'SV:123456:respawn:/usr/bin/svscanboot' /etc/inittab; then
41
echo 'Removing SV inittab entry...'
42
rm -f /etc/inittab'{new}'
43
sed -e '/SV:123456:respawn:\/usr\/bin\/svscanboot/d' \
44
/etc/inittab > /etc/inittab'{new}'
45
mv -f /etc/inittab'{new}' /etc/inittab
52
if grep '^SV:' /etc/inittab >/dev/null; then
55
There already is an SV entry in /etc/inittab. In order to have this
56
package add an entry with the name SV to have daemontools' service
57
supervision started through sysvinit, you need to remove or rename
58
the current SV entry first.
66
if ! grep '^SV:' /etc/inittab >/dev/null; then
67
echo 'Adding SV inittab entry...'
68
cp /etc/inittab /etc/inittab'{new}'
69
cat >>/etc/inittab'{new}' <<-\EOT
70
#-- daemontools-run begin
71
SV:123456:respawn:/usr/bin/svscanboot
72
#-- daemontools-run end
74
mv -f /etc/inittab'{new}' /etc/inittab
19
if test -f /etc/event.d/svscan
21
echo 'Starting svscan-service'