diff --git a/bin/start-DS.sh b/bin/start-DS.sh index a9c9765d52db4fecd744117ef64938f20288511d..06ecb4586e01eff360952ead8af5639ac2a608ee 100755 --- a/bin/start-DS.sh +++ b/bin/start-DS.sh @@ -1,3 +1,4 @@ +#!/bin/bash function help() { why="${1}" @@ -29,14 +30,14 @@ esac # ATTENTION # This is assuming that the device server's Python file exists # on the Docker's host in the user's ${HOME} directory. -runThis=$(basename ${deviceServer}) +runThis=$(basename "${deviceServer}") runThis=${runThis//.sh/.py} -if [ -f ${runThis} ]; then +if [ -f "${runThis}" ]; then myDir=${PWD} else - myDir=${PWD}/$(dirname ${deviceServer}) + myDir=${PWD}/$(dirname "${deviceServer}") fi deviceServerPath=${myDir/${HOME}/\/hosthome} # Tango log lines start with a UNIX timestamp. Replace them with the UTC time. -docker exec -it itango python3 ${deviceServerPath}/${runThis} ${instance} ${@} | perl -ne 'use Time::Piece; s/^([0-9]+)/gmtime($1)->strftime("%F %T")/e; print;' +docker exec -it itango python3 "${deviceServerPath}"/"${runThis}" "${instance}" "${@}" | perl -ne 'use Time::Piece; s/^([0-9]+)/gmtime($1)->strftime("%F %T")/e; print;'