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>
This commit is contained in:
parent
d3cc034185
commit
53073babbf
3 changed files with 11 additions and 5 deletions
|
@ -380,8 +380,10 @@ endef
|
||||||
define Package/$(PKG_NAME)/postinst
|
define Package/$(PKG_NAME)/postinst
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
if [ -z "$${IPKG_INSTROOT}" ]; then
|
if [ -z "$${IPKG_INSTROOT}" ]; then
|
||||||
# Prevent autostart of $(PRG_NAME)
|
# Prevent $(PRG_NAME) from auto-starting after an upgrade. The modules may
|
||||||
touch $(FS_STABLE_SYSCONF_DIR)/$(PRG_NAME)_disabled
|
# 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
|
||||||
echo "o-------------------------------------------------------------------o"
|
echo "o-------------------------------------------------------------------o"
|
||||||
|
|
|
@ -1,5 +1,9 @@
|
||||||
### FreeSWITCH configuration ###
|
### FreeSWITCH configuration ###
|
||||||
|
|
||||||
|
# Uncomment once you verified your configuration, otherwise the init script will
|
||||||
|
# not start FreeSWITCH.
|
||||||
|
#ENABLE_FREESWITCH="yes"
|
||||||
|
|
||||||
#FS_USER=freeswitch
|
#FS_USER=freeswitch
|
||||||
#FS_GROUP=freeswitch
|
#FS_GROUP=freeswitch
|
||||||
|
|
||||||
|
|
|
@ -33,9 +33,9 @@ fs_dir_temp="${FS_DIR_TEMP:-/tmp/$FS/temp}"
|
||||||
start_service() {
|
start_service() {
|
||||||
local dir=
|
local dir=
|
||||||
|
|
||||||
if [ -f "/etc/${FS}_disabled" ]; then
|
if [ "$ENABLE_FREESWITCH" != yes ]; then
|
||||||
$LOGGER File \"/etc/${FS}_disabled\" exists
|
$LOGGER User configuration incomplete - not starting $FS
|
||||||
$LOGGER Remove it once your configuration is set up
|
$LOGGER Check ENABLE_FREESWITCH in $DEFAULT
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue