[prev in list] [next in list] [prev in thread] [next in thread] 

List:       ipcop-svn
Subject:    [Ipcop-svn] SF.net SVN: ipcop:[7885] ipcop/trunk/src
From:       owes () users ! sourceforge ! net
Date:       2015-02-09 17:09:40
Message-ID: E1YKrqA-0005c0-Ie () sfs-ml-2 ! v29 ! ch3 ! sourceforge ! com
[Download RAW message or body]

Revision: 7885
          http://sourceforge.net/p/ipcop/svn/7885
Author:   owes
Date:     2015-02-09 17:09:40 +0000 (Mon, 09 Feb 2015)
Log Message:
-----------
Add option to write server.conf directly. Similar to option available for squid.

Modified Paths:
--------------
    ipcop/trunk/src/libs/vpn-functions.pl
    ipcop/trunk/src/progs/restartopenvpn.c

Modified: ipcop/trunk/src/libs/vpn-functions.pl
===================================================================
--- ipcop/trunk/src/libs/vpn-functions.pl	2015-02-09 16:54:04 UTC (rev 7884)
+++ ipcop/trunk/src/libs/vpn-functions.pl	2015-02-09 17:09:40 UTC (rev 7885)
@@ -22,6 +22,7 @@
 
 use strict;
 
+require '/usr/lib/ipcop/general-functions.pl';
 require '/usr/lib/ipcop/header.pl';
 
 

Modified: ipcop/trunk/src/progs/restartopenvpn.c
===================================================================
--- ipcop/trunk/src/progs/restartopenvpn.c	2015-02-09 16:54:04 UTC (rev 7884)
+++ ipcop/trunk/src/progs/restartopenvpn.c	2015-02-09 17:09:40 UTC (rev 7885)
@@ -12,8 +12,7 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with IPCop; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+ * along with IPCop.  If not, see <http://www.gnu.org/licenses/>.
  *
  * $Id$
  *
@@ -42,12 +41,28 @@
     printf("  --start               .\n"); 
     printf("  --stop                .\n"); 
     printf("  --restart             .\n"); 
+//    printf("      --config          re-generate server.conf\n");
     printf("  -v, --verbose         be verbose\n");
     printf("      --help            display this help and exit\n");
     exit(exit_code);
 }
 
 
+/*
+    Write server.conf
+*/
+void config()
+{
+    char command[STRING_SIZE];
+
+    snprintf(command, STRING_SIZE,
+        "/usr/bin/perl -e \"use NetAddr::IP; require \
'/usr/lib/ipcop/vpn-functions.pl'; &VPN::writeovpnserverconf();\""); +    \
safe_system(command); +
+    exit(0);
+}
+
+
 int main(int argc, char *argv[])
 {
     int i, j;
@@ -59,6 +74,7 @@
         { "start",   no_argument, &flag_start, 1 },
         { "stop",    no_argument, &flag_stop, 1 },
         { "restart", no_argument, &flag_restart, 1 },
+        { "config", no_argument, 0, 'c' },
         { "verbose", no_argument, 0, 'v' },
         { "help",    no_argument, 0, 'h' },
         { 0, 0, 0, 0}
@@ -73,6 +89,8 @@
         case 'v':              /* verbose */
             flag_verbose++;
             break;
+        case 'c':
+            config();
         case 'h':
             usage(argv[0], 0);
         default:

This was sent by the SourceForge.net collaborative development platform, the world's \
largest Open Source development site.


------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Ipcop-svn mailing list
Ipcop-svn@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ipcop-svn


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic