From 2903c1cb17f401fc472b06b2fdf35046b3d6ca75 Mon Sep 17 00:00:00 2001 From: iroque <28881819+laurentroque@users.noreply.github.com> Date: Wed, 28 Jan 2026 15:59:15 -0800 Subject: [PATCH] startami: strip trailing '})' from amicmd to avoid eval syntax error --- scripts/startami | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/startami b/scripts/startami index 4c456600..d80e20da 100755 --- a/scripts/startami +++ b/scripts/startami @@ -72,6 +72,8 @@ ami_path=$ami_base_path$(grep ami_GUI_path /reg/g/pcds/dist/pds/"$HUTCH"/scripts proxy_cds=$(/reg/g/pcds/dist/pds/"$HUTCH"/current/tools/procmgr/procmgr status /reg/g/pcds/dist/pds/"$HUTCH"/scripts/"$CONFIG" | grep ami_proxy | awk '{print $1}' | sed s/'-fez'/''/g) amicmd=$(grep ami_client /reg/g/pcds/dist/pds/"$HUTCH"/scripts/"$CONFIG" | grep -v '#' | awk 'BEGIN { FS = ":" }; { print $4}' | sed s/ami_GUI_path//g | sed s/\'+proxy_cds/"$proxy_cds"/g | sed s:\'+expname:"$EXPNAME"/:g | sed s/+\'//g | sed s/\'\}\)//g) +# Strip trailing cnf/python artifacts (e.g. "})") so eval doesn't choke +amicmd=$(printf "%s" "$amicmd" | sed 's/[[:space:]]*[})][})]*$//') if [[ "$DAQHOST" == *"$HOSTNAME" ]]; then # Check host and daq host line share host name... #running on the DAQ host, this will restart the ami_client!