From a shell script I am executing this:
exec "su - $PRODUCT_USER -c 'CATALINA_PID=\"$CATALINA_PID\" \"$CATALINA_RUN_SCRIPT\" start'"
and I get as an error in the console
./runService.sh[10]: su - testUser -c 'CATALINA_PID="/home/tomcat.pid" "/home/subScript.sh" start': not found.
eval
instead ofexec
? You don't need to quote the whole command to be a single word withexec
. Just doexec su - ....
– muru Jan 30 '20 at 08:29su
. https://unix.stackexchange.com/a/353698/5132 https://unix.stackexchange.com/a/465353/5132 – JdeBP Jan 30 '20 at 09:10