[GLLUG] Help with a script..

Iain M Conochie iain at shihad.org
Mon Jan 6 21:52:05 UTC 2014


On 2014-01-06 20:17, Jean van Wyngaardt wrote:
> Hey guys
>
> Working out this VPN script and it won't run because of line 7
> (highlighted in bold below). Seeing as my scripting knowledge is
> limited, I thought I might check with you!
>
> #!/bin/sh
> while [ "true" ]
> do
>  vpnck=$(nmcli con status uuid 3e46a1d0-ab02-4d69-bd36-31dfcc01af6d)
instead of this
>  if [[ $vpnck == *cryptocloud* ]]
>  then
>  ELSE
try this
    if [[ $vpnchk != *cryptocloud* ]]
    then
>  (sleep 1s && nmcli con up uuid 3e46a1d0-ab02-4d69-bd36-31dfcc01af6d)
>  fi
>  sleep 20
> done

  Since you are not looking for the true as you do not seem to want to 
do anything with that check for the false

Cheers

Iain
>
>  Jean
>
>  JEAN VAN WYNGAARDT
>
>  07599 428068
>  info at jeangabriel.co.uk [1]
>  http://runlevel.co.uk [2]
>  http://mactribe.co.uk [3]
>
>
> Links:
> ------
> [1] mailto:info at jeangabriel.co.uk
> [2] http://runlevel.co.uk
> [3] http://mactribe.co.uk





More information about the GLLUG mailing list