<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: need the script to show via browser if the vpn client is running in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/need-the-script-to-show-via-browser-if-the-vpn-client-is-running/m-p/3179454#M9462</link>
    <description>Hi chris,&lt;BR /&gt;&lt;BR /&gt;It is relatively easy to setup i hope. &lt;BR /&gt;Go through this perl CGI module page and you can easily set up what you want:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://stein.cshl.org/WWW/software/CGI/" target="_blank"&gt;http://stein.cshl.org/WWW/software/CGI/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Hope this helps&lt;BR /&gt;vijay</description>
    <pubDate>Sat, 31 Jan 2004 13:02:13 GMT</pubDate>
    <dc:creator>Vijaya Kumar_3</dc:creator>
    <dc:date>2004-01-31T13:02:13Z</dc:date>
    <item>
      <title>need the script to show via browser if the vpn client is running</title>
      <link>https://community.hpe.com/t5/operating-system-linux/need-the-script-to-show-via-browser-if-the-vpn-client-is-running/m-p/3179453#M9461</link>
      <description>hi&lt;BR /&gt;&lt;BR /&gt;I have cisco vpnclient-linux-3.7.3.A-k9&lt;BR /&gt;installed on linux server SuSE 8.2.&lt;BR /&gt;This server is also the proxy server&lt;BR /&gt;for 300 clients.&lt;BR /&gt;So all our users have vpn connection &lt;BR /&gt;via proxy and I don't need install&lt;BR /&gt;any vpn clients at the workstations. &lt;BR /&gt;&lt;BR /&gt;But sometimes the vpn client is going down,&lt;BR /&gt;so I wrote the php script to start it &lt;BR /&gt;via browser.&lt;BR /&gt;The problem is, that sometimes the remote  server goes down and the vpn client cannot  establish connection and user don't know&lt;BR /&gt;where the problem is.&lt;BR /&gt;&lt;BR /&gt;I need the second PHP or Perl script to show&lt;BR /&gt;in browser if the VPN client is running or not.&lt;BR /&gt;So if I am not in the office, users can check it.&lt;BR /&gt;I thought, to check the proces:&lt;BR /&gt;&lt;BR /&gt;# ps ax | grep vpnclient | grep -v grep&lt;BR /&gt;11153 ?        S      0:00 /usr/local/bin/vpnclient&lt;BR /&gt;&lt;BR /&gt;and show via browser:&lt;BR /&gt;&lt;BR /&gt;"VPN Client is up and running"  &lt;BR /&gt;&lt;BR /&gt;any idea ?&lt;BR /&gt;&lt;BR /&gt;kind regards&lt;BR /&gt;chris</description>
      <pubDate>Sat, 31 Jan 2004 08:00:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/need-the-script-to-show-via-browser-if-the-vpn-client-is-running/m-p/3179453#M9461</guid>
      <dc:creator>'chris'</dc:creator>
      <dc:date>2004-01-31T08:00:47Z</dc:date>
    </item>
    <item>
      <title>Re: need the script to show via browser if the vpn client is running</title>
      <link>https://community.hpe.com/t5/operating-system-linux/need-the-script-to-show-via-browser-if-the-vpn-client-is-running/m-p/3179454#M9462</link>
      <description>Hi chris,&lt;BR /&gt;&lt;BR /&gt;It is relatively easy to setup i hope. &lt;BR /&gt;Go through this perl CGI module page and you can easily set up what you want:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://stein.cshl.org/WWW/software/CGI/" target="_blank"&gt;http://stein.cshl.org/WWW/software/CGI/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Hope this helps&lt;BR /&gt;vijay</description>
      <pubDate>Sat, 31 Jan 2004 13:02:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/need-the-script-to-show-via-browser-if-the-vpn-client-is-running/m-p/3179454#M9462</guid>
      <dc:creator>Vijaya Kumar_3</dc:creator>
      <dc:date>2004-01-31T13:02:13Z</dc:date>
    </item>
    <item>
      <title>Re: need the script to show via browser if the vpn client is running</title>
      <link>https://community.hpe.com/t5/operating-system-linux/need-the-script-to-show-via-browser-if-the-vpn-client-is-running/m-p/3179455#M9463</link>
      <description>Would this php script be useful in your case?&lt;BR /&gt;There you can write a script that includes ps command with arguments and pipes or just hardcode it in php like this sample shows. there grep -c counts how many lines has hitted so if vpnclient line is found then output has value 1. &lt;BR /&gt;$output=shell_exec("ps ax | grep -v grep | grep -c vpnclient");&lt;BR /&gt;if ($output != 0) {&lt;BR /&gt;  echo "VPN client is up and running!&lt;BR /&gt;;&lt;BR /&gt;} else {&lt;BR /&gt;  echo "Here what to do then!&lt;BR /&gt;"&lt;BR /&gt;}&lt;BR /&gt;?&amp;gt;&lt;BR /&gt;&lt;BR /&gt;Regards Toni</description>
      <pubDate>Mon, 02 Feb 2004 01:35:56 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/need-the-script-to-show-via-browser-if-the-vpn-client-is-running/m-p/3179455#M9463</guid>
      <dc:creator>Toni Niemi</dc:creator>
      <dc:date>2004-02-02T01:35:56Z</dc:date>
    </item>
    <item>
      <title>Re: need the script to show via browser if the vpn client is running</title>
      <link>https://community.hpe.com/t5/operating-system-linux/need-the-script-to-show-via-browser-if-the-vpn-client-is-running/m-p/3179456#M9464</link>
      <description>hi toni&lt;BR /&gt;&lt;BR /&gt;I tried your script, but I get this error:&lt;BR /&gt;&lt;BR /&gt;parse error, unexpected T_STRING, expecting ',' or ';' in /srv/www/htdocs/coda1.php on line 31&lt;BR /&gt;&lt;BR /&gt;kind regards&lt;BR /&gt;chris</description>
      <pubDate>Mon, 02 Feb 2004 04:47:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/need-the-script-to-show-via-browser-if-the-vpn-client-is-running/m-p/3179456#M9464</guid>
      <dc:creator>'chris'</dc:creator>
      <dc:date>2004-02-02T04:47:06Z</dc:date>
    </item>
    <item>
      <title>Re: need the script to show via browser if the vpn client is running</title>
      <link>https://community.hpe.com/t5/operating-system-linux/need-the-script-to-show-via-browser-if-the-vpn-client-is-running/m-p/3179457#M9465</link>
      <description>anyway I corrected it&lt;BR /&gt;&lt;BR /&gt;$output=shell_exec("ps ax | grep -v grep | grep -c vpnclient");&lt;BR /&gt;if ($output != 0) {&lt;BR /&gt;echo "VPN client is up and running!";&lt;BR /&gt;} else {&lt;BR /&gt;echo "Here what to do then!";&lt;BR /&gt;}&lt;BR /&gt;?&amp;gt;&lt;BR /&gt; &lt;BR /&gt;now it works well !&lt;BR /&gt;&lt;BR /&gt;regards&lt;BR /&gt;chris</description>
      <pubDate>Mon, 02 Feb 2004 06:46:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/need-the-script-to-show-via-browser-if-the-vpn-client-is-running/m-p/3179457#M9465</guid>
      <dc:creator>'chris'</dc:creator>
      <dc:date>2004-02-02T06:46:12Z</dc:date>
    </item>
    <item>
      <title>Re: need the script to show via browser if the vpn client is running</title>
      <link>https://community.hpe.com/t5/operating-system-linux/need-the-script-to-show-via-browser-if-the-vpn-client-is-running/m-p/3179458#M9466</link>
      <description>thanks toni and have a nice day !</description>
      <pubDate>Mon, 02 Feb 2004 06:47:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/need-the-script-to-show-via-browser-if-the-vpn-client-is-running/m-p/3179458#M9466</guid>
      <dc:creator>'chris'</dc:creator>
      <dc:date>2004-02-02T06:47:41Z</dc:date>
    </item>
    <item>
      <title>Re: need the script to show via browser if the vpn client is running</title>
      <link>https://community.hpe.com/t5/operating-system-linux/need-the-script-to-show-via-browser-if-the-vpn-client-is-running/m-p/3179459#M9467</link>
      <description>Hello Chris&lt;BR /&gt;&lt;BR /&gt;Ah, sorry, every command needs to end with semicolon, since coding is not my main work it seems to be forgotten pretty easely;-) And I have to admit that I didnt test the code before suggesting it. Well it didnt seem to be a problem to you after all so problem solved.&lt;BR /&gt;&lt;BR /&gt;Have a nice day too, Chris!!&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;   Toni</description>
      <pubDate>Tue, 03 Feb 2004 03:06:44 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/need-the-script-to-show-via-browser-if-the-vpn-client-is-running/m-p/3179459#M9467</guid>
      <dc:creator>Toni Niemi</dc:creator>
      <dc:date>2004-02-03T03:06:44Z</dc:date>
    </item>
  </channel>
</rss>

