replaced the example manager database by a sql script
authorMartin Willi <martin@strongswan.org>
Tue, 1 Apr 2008 07:16:48 +0000 (07:16 -0000)
committerMartin Willi <martin@strongswan.org>
Tue, 1 Apr 2008 07:16:48 +0000 (07:16 -0000)
src/manager/Makefile.am
src/manager/manager.db [deleted file]
src/manager/sqlite.sql [new file with mode: 0644]

index 4b24175..3e27d5c 100644 (file)
@@ -14,8 +14,6 @@ INCLUDES = -I$(top_srcdir)/src/libstrongswan -I$(top_srcdir)/src/libfast ${xml_C
 AM_CFLAGS = -rdynamic -DIPSECDIR=\"${ipsecdir}\" -DIPSEC_PIDDIR=\"${piddir}\" \
   -DIPSEC_PLUGINDIR=\"${plugindir}\"
 
-ipsec_DATA = manager.db
-
 # Don't forget to add templates to EXTRA_DIST !!! How to automate?
 ipsec_templatesdir = ${ipsecdir}/templates
 ipsec_templates_DATA = templates/header.cs templates/footer.cs templates/error.cs
@@ -44,7 +42,7 @@ templates/static/gateway-left.png templates/static/client-left.png templates/sta
 templates/static/router.png templates/static/gateway-right.png templates/static/client-right.png \
 templates/static/close.png templates/static/initiate.png
 
-EXTRA_DIST = manager.db templates/header.cs templates/footer.cs templates/error.cs \
+EXTRA_DIST = templates/header.cs templates/footer.cs templates/error.cs \
 templates/auth/login.cs templates/gateway/list.cs templates/ikesa/list.cs \
 templates/config/list.cs templates/control/result.cs \
 templates/static/style.css templates/static/script.js templates/static/jquery.js \
diff --git a/src/manager/manager.db b/src/manager/manager.db
deleted file mode 100644 (file)
index 23b6ed2..0000000
Binary files a/src/manager/manager.db and /dev/null differ
diff --git a/src/manager/sqlite.sql b/src/manager/sqlite.sql
new file mode 100644 (file)
index 0000000..c60025e
--- /dev/null
@@ -0,0 +1,30 @@
+
+CREATE TABLE users (
+       username TEXT, password TEXT
+);
+
+CREATE TABLE gateways (
+       name TEXT,
+       port INTEGER,
+       address text
+);
+
+CREATE TABLE user_gateway (
+       user INTEGER,
+       gateway INTEGER
+);
+
+INSERT INTO users VALUES(
+       'strongSwan',
+       '44092c0394d3661bd3c3587f43e48729836bdf6e' -- strongSwan
+);
+
+INSERT INTO gateways VALUES(
+       'Local Unix',
+       0,
+       '/var/run/charon.xml'
+);
+
+INSERT INTO user_gateway VALUES(
+       1,1
+);