I have a script to run a service:
#!/bin/bash
export HOME=/home/recusr
cd /home/recusr/pasayobloques/blokes/
su myUser -c meteor -- port 9999
exit
But I get the following error message when running it:
su unrecognized option '--port'
CodePudding user response:
The entire command argument to su
must be a single argument.
su myUser -c 'meteor --port 9999'
In your script, --port
is being interpreted as the next argument to su
, not part of the command after -c
.