diff options
| author | Sebastian Kemper | 2017-12-26 13:05:31 +0000 |
|---|---|---|
| committer | Sebastian Kemper | 2017-12-26 13:05:52 +0000 |
| commit | 53073babbf9a9909756addea9ee1610ed640c1d3 (patch) | |
| tree | 35331f95f64a4215b4be6a43edcb43c9b4e56439 | |
| parent | d3cc034185c70141ddeef6982869e88145948a5f (diff) | |
| download | telephony-53073babbf9a9909756addea9ee1610ed640c1d3.tar.gz | |
freeswitch-stable: improve autostart prevention
The current approach (creating a blocker file) is clumsy. Use a variable
in /etc/default/freeswitch instead.
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
| -rw-r--r-- | net/freeswitch-stable/Makefile | 6 | ||||
| -rw-r--r-- | net/freeswitch-stable/files/freeswitch.default | 4 | ||||
| -rw-r--r-- | net/freeswitch-stable/files/freeswitch.init | 6 |
3 files changed, 11 insertions, 5 deletions
diff --git a/net/freeswitch-stable/Makefile b/net/freeswitch-stable/Makefile index 0a67fee..eaffe8d 100644 --- a/net/freeswitch-stable/Makefile +++ b/net/freeswitch-stable/Makefile @@ -380,8 +380,10 @@ endef define Package/$(PKG_NAME)/postinst #!/bin/sh if [ -z "$${IPKG_INSTROOT}" ]; then - # Prevent autostart of $(PRG_NAME) - touch $(FS_STABLE_SYSCONF_DIR)/$(PRG_NAME)_disabled + # Prevent $(PRG_NAME) from auto-starting after an upgrade. The modules may + # not be upgraded yet and the user configuration may need a revision. + sed -i '/^ENABLE_FREESWITCH="yes"/s/^/#/' \ + $(FS_STABLE_SYSCONF_DIR)/default/$(PRG_NAME) echo echo "o-------------------------------------------------------------------o" diff --git a/net/freeswitch-stable/files/freeswitch.default b/net/freeswitch-stable/files/freeswitch.default index 3d6e911..cfea494 100644 --- a/net/freeswitch-stable/files/freeswitch.default +++ b/net/freeswitch-stable/files/freeswitch.default @@ -1,5 +1,9 @@ ### FreeSWITCH configuration ### +# Uncomment once you verified your configuration, otherwise the init script will +# not start FreeSWITCH. +#ENABLE_FREESWITCH="yes" + #FS_USER=freeswitch #FS_GROUP=freeswitch diff --git a/net/freeswitch-stable/files/freeswitch.init b/net/freeswitch-stable/files/freeswitch.init index 6b349b1..c17768c 100644 --- a/net/freeswitch-stable/files/freeswitch.init +++ b/net/freeswitch-stable/files/freeswitch.init @@ -33,9 +33,9 @@ fs_dir_temp="${FS_DIR_TEMP:-/tmp/$FS/temp}" start_service() { local dir= - if [ -f "/etc/${FS}_disabled" ]; then - $LOGGER File \"/etc/${FS}_disabled\" exists - $LOGGER Remove it once your configuration is set up + if [ "$ENABLE_FREESWITCH" != yes ]; then + $LOGGER User configuration incomplete - not starting $FS + $LOGGER Check ENABLE_FREESWITCH in $DEFAULT exit 1 fi |