summaryrefslogtreecommitdiff
path: root/src/Linux:Vpnc_Restart_Script.ascii
blob: d7f7d0a29739be06d2b2156a4a5978709d0a6104 (plain)
    1 Linux: VPNC Restart Script
    2 ==========================
    3 :author: Aaron Ball
    4 :email: nullspoon@iohq.net
    5 
    6 
    7 == {doctitle}
    8 
    9 The VPN at my company is very... spotty... at best. When working from home, it
   10 used to boot you about once every hour. For whatever reason though, it has
   11 recently started booting sessions every five minutes.  Now, the solution is of
   12 course to speak with our networking folks rather than to write a script to fix
   13 the issue on a client by client basis.  Unfortunately, due to the culture and
   14 various political situations, the networking folks will not fix this because
   15 they don't believe it's an issue. All opinionattion aside, this sounds like an
   16 opportunity for a nice shell script.
   17 
   18 To start things off, on my Linux box I use vpnc from the command line as I
   19 don't want to install network manager due to additional resource consumption
   20 (albeit a very small amount). That said, throw the following script in
   21 +~/bin/vpnconnect+ and include +~/bin+ in your PATH variable (+export
   22 PATH=~/bin:$\{PATH}+).
   23 
   24 [[source]]
   25 == Source
   26 
   27 _Edit_: Found a pretty sizeable flaw in my script. Pulled the source until I
   28 can sort it out.
   29 
   30 
   31 [[order-of-operations]]
   32 == Order of Operations
   33 
   34 . Check if vpnc is already running
   35   * Start if it is not running
   36 . Start an infinite loop
   37   . Sleep 5 to keep from using too many resources
   38   . Check cpu time on pid - if it is greater than 1 minute
   39     * Kill pid and restart vpnc
   40 
   41 
   42 
   43 Category:Linux
   44 Category:Drafts
   45 
   46 
   47 // vim: set syntax=asciidoc:

Generated by cgit