Re: xastir autostart


Ray Wells
 

On 28/04/14 21:38, g4sra wrote:
 

On 27/04/14 23:48, Ray Wells wrote:
> Being a shell script, you may need to have "#!/bin/bash" as the first
> line, making the script ....
>
> #!/bin/bash
> # wait 30 seconds
> sleep 30
> # now really start xastir
> exec /bin/xastir
>
> Ray vk2tv
And what happens then if he is running tsh or csh ;)

Thanks for your comments.

I did think about other shells when writing my suggestion but given that this is a RPi forum where the are many newcomers to Linux, and where the default shell is bash, I chose to not muddy the waters. Anyone who has enough knowledge of Linux to be changing the default shell will likely also have enough knowledge to make the appropriate correction to that line, just as we had to when dash replaced bash as the default shell in Debian at one stage, resulting in some scripts written for the less pedantic bash not running, or running with errors in dash.

Ray vk2tv


The shebang line is a good idea, and essential when the processing
application needs help. If it was a perl script for example then it
would be needed, without, the User's login shell should get used by
default (queryable from the environment).


Join RaspberryPi-4-HamRadio@groups.io to automatically receive all group messages.