[plug] VNC Shell Script

Brock Woolf ultima160 at iinet.net.au
Sun Nov 7 17:47:09 WST 2004


On 07/11/2004, at 5:26 PM, James Devenish wrote:

> Hi,
>
> Glad to hear you are having success.
>
> In message <674F9C44-309D-11D9-8F16-000D936A747A at iinet.net.au>
> on Sun, Nov 07, 2004 at 05:14:18PM +0800, Brock Woolf wrote:
>> /brock_scripts/rfbserver.sh: line 8: syntax error: unexpected end of
>> file
>
> This is the 'fi' problem that I mentioned. Add a line at the end that
> contains only the word 'fi'. Here are two solutions:
>
> 1:
>     #!/bin/sh
>     if ps -auxww | grep "x0rfbserver" | grep -v grep ; then
>         exit 0
>     else
>         DISPLAY=:0 x0rfbserver
>     fi
>
> 2:
>     #!/bin/sh
>     pgrep x0rfbserver >/dev/null || DISPLAY=:0 x0rfbserver
>

Brilliant! It worked!
My bash script is now fully functional. One problem remains,
the cron job isn't running the "rfbserver.sh" file.

I've changed my crontab again
This is what it looks like now :)

*/2 * * * * brock /brock_scripts/rfbserver.sh

- Brock





More information about the plug mailing list