Skip to content
Snippets Groups Projects
Commit 53073bab authored by Sebastian Kemper's avatar Sebastian Kemper
Browse files

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: default avatarSebastian Kemper <sebastian_ml@gmx.net>
parent d3cc0341
No related branches found
No related tags found
No related merge requests found
......@@ -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"
......
### 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
......
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment