Set DISPLAY directly. No need to parse arg

This commit is contained in:
Leone, Mark A [LGS] 2025-07-12 23:35:32 -04:00
parent 6f178c6874
commit a26161cf64

View file

@ -1,14 +1,7 @@
#!/bin/bash #!/bin/bash
chmod +x run.sh chmod +x run.sh
# If first arg is of form :n it will set DISPLAY to :n. Default is :0 # If first arg is of form :n it will set DISPLAY to :n. Default is :0
dsp_prefix=: dsp=$DISPLAY
dsp=:0
# if [[ -n "${1+x}" ]]; then
if [[ $1 == $dsp_prefix* ]]; then
dsp="$1"
shift
fi
# fi
args="$*" args="$*"
rm -f fwledmonitor.service || true rm -f fwledmonitor.service || true
sed -i "s#led_system_monitor.py.*\$#led_system_monitor.py ${args}#" run.sh sed -i "s#led_system_monitor.py.*\$#led_system_monitor.py ${args}#" run.sh