]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-9075 fixup for systemd and sysvinit
authorStanislav Sinyagin <ssinyagin@k-open.com>
Mon, 25 Apr 2016 15:29:35 +0000 (17:29 +0200)
committerStanislav Sinyagin <ssinyagin@k-open.com>
Mon, 25 Apr 2016 15:29:35 +0000 (17:29 +0200)
debian/bootstrap.sh
debian/rules

index 2106bd44fb719cac2299b6f0e5dc82264dce33ed..51a844deb644dcfc8bac2288bb7e9125a4ed7add 100755 (executable)
@@ -1286,16 +1286,11 @@ map_modules "mod_filter" \
   "gencontrol_per_cat" \
   "gencontrol_per_mod geninstall_per_mod genoverrides_per_mod"
 
-##### Not sure if this is needed at all... if this is supposed to be included somewhere it should be for just the freeswitch package
-#if [ ${use_sysvinit} = "true" ]; then
-#    cp -a freeswitch-sysvinit.freeswitch.init freeswitch-all.freeswitch.init
-#    cp -a freeswitch-sysvinit.freeswitch.default freeswitch-all.freeswitch.default
-#    echo -n freeswitch-sysvinit >freeswitch-init.provided_by
-#else
-#    cp -a freeswitch-systemd.freeswitch.service freeswitch-all.freeswitch.service
-#    cp -a freeswitch-systemd.freeswitch.tmpfile freeswitch-all.freeswitch.tmpfile
-#    echo -n freeswitch-systemd >freeswitch-init.provided_by
-#fi
+if [ ${use_sysvinit} = "true" ]; then
+  echo -n freeswitch-sysvinit >freeswitch-init.provided_by
+else
+  echo -n freeswitch-systemd >freeswitch-init.provided_by
+fi
 
 
 echo "Generating additional lintian overrides..." >&2
index 50a3c495a0a161c40894da7477885dc1a7ad35e2..872b1724e15cc50c1298c2a2131da8cf0ceefee6 100755 (executable)
@@ -100,6 +100,14 @@ override_dh_auto_install:
        dh_auto_install -- -C libs/esl pymod-install
        rm -f debian/tmp/usr/share/freeswitch/grammar/model/communicator/COPYING
 
+override_dh_installinit:
+       if [ `cat debian/freeswitch-init.provided_by` = freeswitch-systemd ]; then \
+       dh_systemd_enable -pfreeswitch-systemd --name=freeswitch; \
+       dh_systemd_start  -pfreeswitch-systemd --name=freeswitch; \
+       else \
+       dh_installinit -pfreeswitch-sysvinit --name=freeswitch; \
+       fi
+
 debian-bootstrap: debian/.stamp-bootstrap
 debian/.stamp-bootstrap:
        (cd debian && ./bootstrap.sh)