I use Debian (Raspbian) Wheezy. If this command line works fine:
smsd -c sms/out -i 60 -0 -f sms/smsd.log
and this alias also works fine:
bsmsd='smsd -c sms/out -i 60 -0 -f sms/smsd.log'
then why does this self-same command line in an executable bash script start the command
smsd, but does not see any of the parameters I'm specifying? This is the script:
#!/bin/bash smsd -c sms/out -f /home/pi/sms/smsd.log -i 60 -0 -v
I've tried redirecting and piping, to no avail.
I'm invoking the script (it's called ssmsd) from the command line like so:
After that, this is the output from
ps -fC smsd:
UID PID PPID C STIME TTY TIME CMD
Edit: I know it doesn't recognise the parameters, because it tells me I didn't specify a spooling directory. But I did:
-c sms/out. When called from the script, it gives version number and author, and exits.
Perhaps I should add: it calls itself a daemon, but it's not a well-behaved daemon. You can't
smsd start|stop|restart it, and it doesn't run in the background. So if I call it from a command line (or with that alias) and then start another terminal and do
ps -fC smsd, I get:
UID PID PPID C STIME TTY TIME CMD pi 2860 2621 0 17:49 pts/0 00:00:00 smsd -c xxxxxxx -i 60 -0 -f sms/smsd.log