From 5a35a231ec86ee6e71d18fba0e6ced4f323f4cda Mon Sep 17 00:00:00 2001 From: Sebastian Kemper Date: Mon, 12 Nov 2018 21:20:55 +0100 Subject: [PATCH 1/5] freeswitch-stable: procd compatibility procd runs as pid 1. When freeswitch realizes that its parent has pid 1, it thinks that it has been orphaned and terminates the console thread. That's why procd isn't able to get freeswitch's console output. This commit mutes the check in src/switch_console.c. Now console output is properly logged. The workaround parameters "-nc -nf" are replaced by a proper "-c" ("console"). Additionally this commit hands control over killing freeswitch to procd. It's no longer done by the script. This simplifies things quite a bit. Signed-off-by: Sebastian Kemper --- .../files/freeswitch.hotplug | 7 --- net/freeswitch-stable/files/freeswitch.init | 63 +------------------ .../patches/370-procd-compat.patch | 19 ++++++ 3 files changed, 20 insertions(+), 69 deletions(-) create mode 100644 net/freeswitch-stable/patches/370-procd-compat.patch diff --git a/net/freeswitch-stable/files/freeswitch.hotplug b/net/freeswitch-stable/files/freeswitch.hotplug index 10778cb..0914dca 100644 --- a/net/freeswitch-stable/files/freeswitch.hotplug +++ b/net/freeswitch-stable/files/freeswitch.hotplug @@ -21,13 +21,6 @@ pgrep $FS &> /dev/null if [ $? -eq 0 ]; then $LOG_NOTICE stopping $FS /etc/init.d/$FS stop &> /dev/null - pgrep $FS &> /dev/null - if [ $? -eq 0 ]; then - $LOG_ERR failed to stop $FS - exit 1 - else - $LOG_NOTICE $FS stopped - fi fi config_get FS_HOTPLUG_TIMEOUT hotplug timeout diff --git a/net/freeswitch-stable/files/freeswitch.init b/net/freeswitch-stable/files/freeswitch.init index eb064d4..ac76fa3 100644 --- a/net/freeswitch-stable/files/freeswitch.init +++ b/net/freeswitch-stable/files/freeswitch.init @@ -87,70 +87,9 @@ start_service() { -temp "$fs_dir_temp" \ -u "$fs_user" \ $OPTIONS \ - -nc \ - -nf + -c # forward stderr to logd procd_set_param stderr 1 procd_close_instance } -stop_service() { - local retval - local mypid - local TIMEOUT=30 - local timeout=$TIMEOUT - - pgrep $FS &> /dev/null - [ $? -ne 0 ] && exit 0 - - [ -f "$fs_dir_run"/${FS}.pid ] - retval=$? - - # init script could find itself in a scenario where FS was started - # very recently, so make it wait a while for a pid file to appear - while [ $retval -ne 0 -a $timeout -gt 0 ]; do - sleep 1 - [ -f "$fs_dir_run"/${FS}.pid ] - retval=$? - timeout=$(($timeout-1)) - done - - [ $retval -eq 0 ] || { - $LOGGER PID file does not exist - exit 1 - } - - mypid=$(cat "$fs_dir_run"/${FS}.pid) - - [ "$mypid" -gt 1 ] 2> /dev/null || { - $LOGGER PID file contains garbage - exit 1 - } - - timeout=$TIMEOUT - kill $mypid 2>/dev/null - pgrep $FS | grep -w $mypid &>/dev/null - retval=$? - - while [ $retval -eq 0 -a $timeout -gt 0 ]; do - sleep 10 - pgrep $FS | grep -w $mypid &>/dev/null - retval=$? - [ $retval -eq 0 ] && kill $mypid 2>/dev/null - timeout=$(($timeout-10)) - done - - [ $retval -ne 1 ] && { - $LOGGER application seems to hang - $LOGGER sending SIGKILL - kill -SIGKILL $mypid 2>/dev/null - sleep 3 - pgrep $FS | grep -w $mypid &>/dev/null - retval=$? - } - - [ $retval -ne 1 ] && { - $LOGGER failed to stop $FS - exit 1 - } -} diff --git a/net/freeswitch-stable/patches/370-procd-compat.patch b/net/freeswitch-stable/patches/370-procd-compat.patch new file mode 100644 index 0000000..0549a03 --- /dev/null +++ b/net/freeswitch-stable/patches/370-procd-compat.patch @@ -0,0 +1,19 @@ +--- a/src/switch_console.c ++++ b/src/switch_console.c +@@ -1053,10 +1053,12 @@ static void *SWITCH_THREAD_FUNC console_ + while (running) { + int32_t arg = 0; + +- if (getppid() == 1) { +- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "We've become an orphan, no more console for us.\n"); +- break; +- } ++ // Parent PID is 1 when started by procd - so FS is not an orphan. ++ // Plus we still want the output. ++ //if (getppid() == 1) { ++ // switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "We've become an orphan, no more console for us.\n"); ++ // break; ++ //} + + switch_core_session_ctl(SCSC_CHECK_RUNNING, &arg); + if (!arg) { From e730272a7715c3d5c74c2f55c639d1ce9eac5a36 Mon Sep 17 00:00:00 2001 From: Sebastian Kemper Date: Mon, 12 Nov 2018 21:55:21 +0100 Subject: [PATCH 2/5] freeswitch-stable: move hotplug into main pkg There is no point in keeping the hotplug script in an extra package. Move it to the main package. The priority of the script is changed from 99 to 90 as the freeswitch init script uses the same. The postinstall script will check if 99-freeswitch exists. If it does a warning is displayed with the suggestion to uninstall the hotplug package. Signed-off-by: Sebastian Kemper --- net/freeswitch-stable/Makefile | 46 +++++++++++----------------------- 1 file changed, 14 insertions(+), 32 deletions(-) diff --git a/net/freeswitch-stable/Makefile b/net/freeswitch-stable/Makefile index 6c3d8f0..0dd4dcf 100644 --- a/net/freeswitch-stable/Makefile +++ b/net/freeswitch-stable/Makefile @@ -414,10 +414,13 @@ $(call Package/$(PKG_NAME)/install/lib,$(1),lib$(PRG_NAME)) $(INSTALL_DIR) $(1)$(FS_STABLE_SCRIPTS_DIR) $(INSTALL_DIR) $(1)$(FS_STABLE_SOUNDS_DIR) $(INSTALL_DIR) $(1)$(FS_STABLE_SYSCONF_DIR)/config + $(INSTALL_DIR) $(1)$(FS_STABLE_SYSCONF_DIR)/hotplug.d/iface $(INSTALL_DIR) $(1)$(FS_STABLE_SYSCONF_DIR)/init.d $(INSTALL_DIR) $(1)$(FS_STABLE_TLS_DIR) $(INSTALL_BIN) ./files/$(PRG_NAME).init \ $(1)$(FS_STABLE_SYSCONF_DIR)/init.d/$(PRG_NAME) + $(INSTALL_BIN) ./files/$(PRG_NAME).hotplug \ + $(1)$(FS_STABLE_SYSCONF_DIR)/hotplug.d/iface/90-$(PRG_NAME) $(INSTALL_CONF) ./files/$(PRG_NAME).config \ $(1)$(FS_STABLE_SYSCONF_DIR)/config/$(PRG_NAME) endef @@ -437,37 +440,17 @@ if [ -z "$${IPKG_INSTROOT}" ]; then echo "| Edit /etc/config/freeswitch to change basic init configuration. |" echo "o-------------------------------------------------------------=^_^=-o" echo -fi -exit 0 -endef - -define Package/$(PKG_NAME)-misc-hotplug -$(call Package/$(PKG_NAME)/Default) - TITLE:=Hotplug script - DEPENDS:=$(PKG_NAME) - PKGARCH:=all -endef - -define Package/$(PKG_NAME)-misc-hotplug/description -This package includes a hotplug script for FreeSWITCH. -endef - -define Package/$(PKG_NAME)-misc-hotplug/install - $(INSTALL_DIR) $(1)$(FS_STABLE_SYSCONF_DIR)/hotplug.d/iface - $(INSTALL_BIN) ./files/$(PRG_NAME).hotplug \ - $(1)$(FS_STABLE_SYSCONF_DIR)/hotplug.d/iface/99-$(PRG_NAME) -endef - -define Package/$(PKG_NAME)-misc-hotplug/postinst -#!/bin/sh -if [ -z "$${IPKG_INSTROOT}" ]; then - echo - echo "o-------------------------------------------------------------------o" - echo "| FreeSWITCH hotplug note |" - echo "o-------------------------------------------------------------------o" - echo "| See /etc/config/freeswitch for hotplug hints. |" - echo "o-------------------------------------------------------------=^_^=-o" - echo + [ -f /etc/hotplug.d/iface/99-freeswitch ] && { + echo "o-------------------------------------------------------------------o" + echo "| WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING |" + echo "o-------------------------------------------------------------------o" + echo "| Please remove freeswitch-stable-misc-hotplug. The hotplug script |" + echo "| is now part of the main freeswitch-stable package. Please run: |" + echo "| |" + echo "| opkg remove freeswitch-stable-misc-hotplug |" + echo "o-------------------------------------------------------------=^_^=-o" + echo + } fi exit 0 endef @@ -939,7 +922,6 @@ endef $(eval $(call BuildPackage,$(PKG_LIBFTDM))) $(eval $(call BuildPackage,$(PKG_NAME))) -$(eval $(call BuildPackage,$(PKG_NAME)-misc-hotplug)) $(eval $(call BuildPackage,$(PKG_NAME)-misc-perl-esl)) $(eval $(call BuildPackage,$(PKG_NAME)-misc-python-esl)) $(eval $(call BuildPackage,$(PKG_NAME)-misc-timezones)) From 0e4d42b262f017cb687e4fe721fbcf6315af08c3 Mon Sep 17 00:00:00 2001 From: Sebastian Kemper Date: Mon, 12 Nov 2018 22:04:16 +0100 Subject: [PATCH 3/5] freeswitch-stable: don't force disable on install Don't force freeswitch to off during postinstall. It's not common practice (anywhere) and it may be confusing. Add a link to the Wiki, too, and bump the revision. Signed-off-by: Sebastian Kemper --- net/freeswitch-stable/Makefile | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/net/freeswitch-stable/Makefile b/net/freeswitch-stable/Makefile index 0dd4dcf..766c457 100644 --- a/net/freeswitch-stable/Makefile +++ b/net/freeswitch-stable/Makefile @@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk PRG_NAME:=freeswitch PKG_NAME:=$(PRG_NAME)-stable PKG_VERSION:=1.8.2 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_MAINTAINER:=Sebastian Kemper PKG_SOURCE:=$(PRG_NAME)-$(PKG_VERSION).tar.xz @@ -428,16 +428,14 @@ endef define Package/$(PKG_NAME)/postinst #!/bin/sh if [ -z "$${IPKG_INSTROOT}" ]; then - # Prevent $(PRG_NAME) from auto-starting after an upgrade. The modules may - # not be upgraded yet and the user configuration may need a revision. - uci set freeswitch.general.enabled=0 - uci commit freeswitch - echo echo "o-------------------------------------------------------------------o" echo "| FreeSWITCH note |" echo "o-------------------------------------------------------------------o" echo "| Edit /etc/config/freeswitch to change basic init configuration. |" + echo "| |" + echo "| Also visit the Wiki at: |" + echo "| https://openwrt.org/docs/guide-user/services/voip/freeswitch |" echo "o-------------------------------------------------------------=^_^=-o" echo [ -f /etc/hotplug.d/iface/99-freeswitch ] && { From 92bdfa634d73798b6e5b2fd0767a74e87b62ebd5 Mon Sep 17 00:00:00 2001 From: Sebastian Kemper Date: Mon, 12 Nov 2018 22:20:22 +0100 Subject: [PATCH 4/5] freeswitch-stable: cleanup hotplug script - clean up variable names - replace pgrep with pidof - remove LOG_WARN and use LOG_ERR instead Signed-off-by: Sebastian Kemper --- .../files/freeswitch.hotplug | 78 +++++++++---------- 1 file changed, 38 insertions(+), 40 deletions(-) diff --git a/net/freeswitch-stable/files/freeswitch.hotplug b/net/freeswitch-stable/files/freeswitch.hotplug index 0914dca..68fc3b0 100644 --- a/net/freeswitch-stable/files/freeswitch.hotplug +++ b/net/freeswitch-stable/files/freeswitch.hotplug @@ -1,52 +1,51 @@ #!/bin/sh -FS=freeswitch -LOGGER="/usr/bin/logger -t ${FS}-hotplug" +NAME=freeswitch +COMMAND=/etc/init.d/$NAME + +LOGGER="/usr/bin/logger -t $NAME-hotplug" LOG_ERR="$LOGGER -p user.err --" LOG_NOTICE="$LOGGER -p user.notice --" -LOG_WARN="$LOGGER -p user.warn --" [ "$ACTION" = ifup ] || exit 0 . /lib/functions.sh -config_load $FS +config_load $NAME -config_get FS_HOTPLUG_INTERFACE hotplug interface +config_get interface hotplug interface -[ -n "$FS_HOTPLUG_INTERFACE" ] || exit 0 +[ "$INTERFACE" = "$interface" ] || exit 0 -[ "$INTERFACE" = "$FS_HOTPLUG_INTERFACE" ] || exit 0 - -pgrep $FS &> /dev/null +pidof $NAME &> /dev/null if [ $? -eq 0 ]; then - $LOG_NOTICE stopping $FS - /etc/init.d/$FS stop &> /dev/null + $LOG_NOTICE stopping $NAME + $COMMAND stop &> /dev/null fi -config_get FS_HOTPLUG_TIMEOUT hotplug timeout +config_get timeout hotplug timeout 60 -[ "$FS_HOTPLUG_TIMEOUT" -gt 0 ] 2> /dev/null || unset FS_HOTPLUG_TIMEOUT -TIMEOUT="${FS_HOTPLUG_TIMEOUT:-60}" +[ "$timeout" -gt 0 ] 2> /dev/null || unset timeout +timeout="${timeout:-60}" -config_get FS_HOTPLUG_MOUNTPOINT hotplug mount_point +config_get mount_point hotplug mount_point -# Mount condition, idea lifted from OpenWrt wiki -[ -n "$FS_HOTPLUG_MOUNTPOINT" ] && { +# Mount condition, idea lifted from OpenWrt Wiki +[ -n "$mount_point" ] && { - if ! [ -d "$FS_HOTPLUG_MOUNTPOINT" ]; then - $LOG_ERR "$FS_HOTPLUG_MOUNTPOINT" not a valid mount point + if ! [ -d "$mount_point" ]; then + $LOG_ERR "$mount_point" not a valid mount point exit 1 fi - mnt="$FS_HOTPLUG_MOUNTPOINT" + mnt="$mount_point" notReady=start - timeout=$TIMEOUT + tmp_timeout=$timeout - while [ -n "$notReady" -a $timeout -gt 0 ]; do + while [ -n "$notReady" -a $tmp_timeout -gt 0 ]; do if [ "$notReady" != start ]; then - $LOG_NOTICE "$mnt" not yet mounted, timeout in $timeout s + $LOG_NOTICE "$mnt" not yet mounted, timeout in $tmp_timeout s sleep 5 - timeout=$(($timeout-5)) + tmp_timeout=$(($tmp_timeout-5)) fi notReady= @@ -59,7 +58,7 @@ config_get FS_HOTPLUG_MOUNTPOINT hotplug mount_point if [ -n "$notReady" ]; then $LOG_ERR "$mnt" still not mounted - $LOG_ERR not starting $FS + $LOG_ERR not starting $NAME exit 1 else $LOG_NOTICE "$mnt" mounted @@ -67,10 +66,10 @@ config_get FS_HOTPLUG_MOUNTPOINT hotplug mount_point } -config_get_bool FS_HOTPLUG_NTPD hotplug ntpd 0 +config_get_bool ntpd hotplug ntpd 0 # ntpd condition -[ $FS_HOTPLUG_NTPD -eq 1 ] && { +[ $ntpd -eq 1 ] && { type ntpq &> /dev/null [ $? -eq 0 ] || { @@ -78,19 +77,19 @@ config_get_bool FS_HOTPLUG_NTPD hotplug ntpd 0 exit 1 } - pgrep ntpd &> /dev/null || { + pidof ntpd &> /dev/null || { $LOG_ERR ntpd not running exit 1 } notReady=start - timeout=$TIMEOUT + tmp_timeout=$timeout - while [ -n "$notReady" -a $timeout -gt 0 ]; do + while [ -n "$notReady" -a $tmp_timeout -gt 0 ]; do if [ "$notReady" != start ]; then - $LOG_NOTICE system time not in sync yet, timeout in $timeout s + $LOG_NOTICE system time not in sync yet, timeout in $tmp_timeout s sleep 5 - timeout=$(($timeout-5)) + tmp_timeout=$(($tmp_timeout-5)) fi notReady= @@ -98,7 +97,7 @@ config_get_bool FS_HOTPLUG_NTPD hotplug ntpd 0 result=$(ntpq -c 'timeout 300' -c 'rv 0 stratum' 2> /dev/null | \ awk -F '=' '{print $2}' | grep -o -E '^[0-9]+') if [ -z $result ]; then - $LOG_WARN failed to extract stratum from ntpd + $LOG_ERR failed to extract stratum from ntpd notReady="unable to extract stratum" else $LOG_NOTICE ntpd stratum $result @@ -106,7 +105,7 @@ config_get_bool FS_HOTPLUG_NTPD hotplug ntpd 0 result=$(ntpq -c 'timeout 300' -c 'rv 0 offset' 2> /dev/null \ | awk -F '=' '{print $2}' | grep -o -E '^-?[0-9]+') if [ -z $result ]; then - $LOG_WARN failed to extract offset from ntpd + $LOG_ERR failed to extract offset from ntpd notReady="unable to extract offset" else # "-0" looks stupid, so remove "-" @@ -123,7 +122,7 @@ config_get_bool FS_HOTPLUG_NTPD hotplug ntpd 0 if [ -n "$notReady" ]; then $LOG_ERR system time still not in sync - $LOG_ERR not starting $FS + $LOG_ERR not starting $NAME exit 1 else $LOG_NOTICE system time in sync @@ -131,13 +130,12 @@ config_get_bool FS_HOTPLUG_NTPD hotplug ntpd 0 } -/etc/init.d/$FS start &> /dev/null -# Wait a bit in order for pgrep to be able to find the new process +$COMMAND start &> /dev/null sleep 1 -pgrep $FS &>/dev/null +pidof $NAME &>/dev/null if [ $? -eq 0 ]; then - $LOG_NOTICE started $FS due to \"ifup "$INTERFACE"\" event + $LOG_NOTICE started $NAME due to \"ifup "$INTERFACE"\" event else - $LOG_ERR start of $FS due to \"ifup "$INTERFACE"\" event failed + $LOG_ERR start of $NAME due to \"ifup "$INTERFACE"\" event failed exit 1 fi From 84bf41e1393c10a2e44c49c12551c8a7b36f8bcb Mon Sep 17 00:00:00 2001 From: Sebastian Kemper Date: Mon, 12 Nov 2018 22:29:25 +0100 Subject: [PATCH 5/5] freeswitch-stable: cleanup init script - clean up variable names - add options to uci config to enable/disable logging - remove option change_perm as it's hacky - change check before mkdir and friends to prevent overwriting/chown/chmod of existing files/directories (important) Signed-off-by: Sebastian Kemper --- net/freeswitch-stable/files/freeswitch.config | 3 +- net/freeswitch-stable/files/freeswitch.init | 103 +++++++++--------- 2 files changed, 53 insertions(+), 53 deletions(-) diff --git a/net/freeswitch-stable/files/freeswitch.config b/net/freeswitch-stable/files/freeswitch.config index 66f8891..d7c591a 100644 --- a/net/freeswitch-stable/files/freeswitch.config +++ b/net/freeswitch-stable/files/freeswitch.config @@ -3,8 +3,9 @@ config freeswitch 'general' option enabled '0' option user 'freeswitch' option group 'freeswitch' + option log_stderr '1' + option log_stdout '1' option options '-nonat -np' - option change_perm '0' config freeswitch 'directories' option cache '/tmp/freeswitch/cache' diff --git a/net/freeswitch-stable/files/freeswitch.init b/net/freeswitch-stable/files/freeswitch.init index ac76fa3..a8270f5 100644 --- a/net/freeswitch-stable/files/freeswitch.init +++ b/net/freeswitch-stable/files/freeswitch.init @@ -7,89 +7,88 @@ USE_PROCD=1 #PROCD_DEBUG=1 -FS=freeswitch -LOGGER="/usr/bin/logger -p user.err -s -t $FS" +NAME=freeswitch +COMMAND=/usr/bin/$NAME -# used in both start_service() and stop_service() -fs_dir_run=/var/run/$FS +LOGGER="/usr/bin/logger -p user.err -s -t $NAME" start_service() { - local change_perm local dir local enabled - local fs_user - local fs_group + local user + local group - local fs_dir_cache - local fs_dir_db - local fs_dir_etc=/etc/$FS - local fs_dir_localstate=/var/lib/$FS - local fs_dir_log - local fs_dir_recordings - local fs_dir_storage - local fs_dir_temp + local log_stderr + local log_stdout - local OPTIONS + local dir_cache + local dir_db + local dir_etc=/etc/$NAME + local dir_localstate=/var/lib/$NAME + local dir_log + local dir_recordings + local dir_run=/var/run/$NAME + local dir_storage + local dir_temp - local PROG=/usr/bin/$FS + local options - config_load $FS + config_load $NAME config_get_bool enabled general enabled 0 if [ $enabled -eq 0 ]; then - $LOGGER service not enabled in /etc/config/$FS + $LOGGER service not enabled in /etc/config/$NAME exit 1 fi - config_get fs_user general user $FS - config_get fs_group general group $FS + config_get user general user $NAME + config_get group general group $NAME - config_get fs_dir_cache directories cache /tmp/$FS/cache - config_get fs_dir_db directories db /tmp/$FS/db - config_get fs_dir_log directories log /tmp/$FS/log - config_get fs_dir_recordings directories recordings /tmp/$FS/recordings - config_get fs_dir_storage directories storage /tmp/$FS/storage - config_get fs_dir_temp directories temp /tmp/$FS/temp + config_get_bool log_stderr general log_stderr 1 + config_get_bool log_stdout general log_stdout 1 - for dir in "$fs_dir_cache" "$fs_dir_db" "$fs_dir_localstate" \ - "$fs_dir_log" "$fs_dir_recordings" "$fs_dir_run" "$fs_dir_storage" \ - "$fs_dir_temp" + config_get dir_cache directories cache /tmp/$NAME/cache + config_get dir_db directories db /tmp/$NAME/db + config_get dir_log directories log /tmp/$NAME/log + config_get dir_recordings directories recordings /tmp/$NAME/recordings + config_get dir_storage directories storage /tmp/$NAME/storage + config_get dir_temp directories temp /tmp/$NAME/temp + + for dir in "$dir_cache" "$dir_db" "$dir_localstate" \ + "$dir_log" "$dir_recordings" "$dir_run" "$dir_storage" \ + "$dir_temp" do - [ -n "$dir" ] && { + [ ! -e "$dir" ] && { mkdir -p "$dir" - chown "$fs_user":"$fs_group" "$dir" + chown "$user":"$group" "$dir" chmod 750 "$dir" } done - config_get_bool change_perm general change_perm 0 - [ $change_perm -eq 1 ] && [ -d "$fs_dir_etc" ] && { - find "$fs_dir_etc" -type f -exec chown root:"$fs_group" {} \; - find "$fs_dir_etc" -type f -exec chmod 640 {} \; - } - - config_get OPTIONS general options + config_get options general options procd_open_instance # starting with full path seems cleaner judging by 'ps' output - procd_set_param command $PROG + procd_set_param command $COMMAND # 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" \ - -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 \ + -cache "$dir_cache" \ + -conf "$dir_etc" \ + -db "$dir_db" \ + -g "$group" \ + -log "$dir_log" \ + -recordings "$dir_recordings" \ + -run "$dir_run" \ + -storage "$dir_storage" \ + -temp "$dir_temp" \ + -u "$user" \ + $options \ -c # forward stderr to logd - procd_set_param stderr 1 + procd_set_param stderr $log_stderr + # same for stdout + procd_set_param stdout $log_stdout procd_close_instance }