$(1)$(FS_STABLE_SYSCONF_DIR)/init.d/$(PRG_NAME)
$(INSTALL_CONF) ./files/$(PRG_NAME).default \
$(1)$(FS_STABLE_SYSCONF_DIR)/default/$(PRG_NAME)
-ifeq ($(CONFIG_FS_STABLE_WITH_LIBEDIT),)
- $(SED) '/^ #procd_append_param command -nc -nf$$$$/s/#//' \
- $(1)$(FS_STABLE_SYSCONF_DIR)/init.d/$(PRG_NAME)
-endif
endef
define Package/$(PKG_NAME)/postinst
#FS_DIR_STORAGE="/tmp/freeswitch/storage"
#FS_DIR_TEMP="/tmp/freeswitch/temp"
-# The following is appended to the command line when starting FreeSWITCH:
-OPTIONS="-np -nonat"
+# The following is added to the command line when starting FreeSWITCH:
+OPTIONS="-nonat -np"
### Hotplug configuration ###
DEFAULT=/etc/default/$FS
LOGGER="/usr/bin/logger -p user.err -s -t $FS"
OPTIONS=
+PROG=/usr/bin/$FS
TIMEOUT=30
[ -f $DEFAULT ] && . $DEFAULT
procd_open_instance
# starting with full path seems cleaner judging by 'ps' output
- procd_set_param command /usr/bin/$FS
+ procd_set_param command $PROG
# need to specify all or none of -conf, -log, and -db
- procd_append_param command -cache "$fs_dir_cache" -conf \
- "$fs_dir_etc" -db "$fs_dir_db" -log "$fs_dir_log" -recordings \
- "$fs_dir_recordings" -run "$fs_dir_run" -storage "$fs_dir_storage" \
- -temp "$fs_dir_temp"
- procd_append_param command -c
- # -nc -nf: workaround for interop issue (which causes high load)
- #procd_append_param command -nc -nf
- procd_append_param command $OPTIONS
- procd_set_param user "$fs_user"
- # forward stdout of the command to logd
- #procd_set_param stdout 1
- # same for stderr
+ procd_append_param command \
+ -cache "$fs_dir_cache" \
+ -conf "$fs_dir_etc" \
+ -db "$fs_dir_db" \
+ -g "$fs_group" \
+ -log "$fs_dir_log" \
+ -recordings "$fs_dir_recordings" \
+ -run "$fs_dir_run" \
+ -storage "$fs_dir_storage" \
+ -temp "$fs_dir_temp" \
+ -u "$fs_user" \
+ $OPTIONS \
+ -nc \
+ -nf
+ # forward stderr to logd
procd_set_param stderr 1
procd_close_instance
}
}
timeout=$TIMEOUT
- kill $mypid
+ kill $mypid 2>/dev/null
pgrep $FS | grep -w $mypid &>/dev/null
retval=$?