added debugging helper script for manager
authorMartin Willi <martin@strongswan.org>
Thu, 13 Sep 2007 08:15:24 +0000 (08:15 -0000)
committerMartin Willi <martin@strongswan.org>
Thu, 13 Sep 2007 08:15:24 +0000 (08:15 -0000)
src/manager/make-debug [new file with mode: 0755]

diff --git a/src/manager/make-debug b/src/manager/make-debug
new file mode 100755 (executable)
index 0000000..c1093a1
--- /dev/null
@@ -0,0 +1,15 @@
+#!/bin/bash
+#
+# Debug helper script, launches manager statically. Use Apache config:
+#   FastCgiIpcDir /var/lib/apache2/fastcgi
+#   FastCgiExternalServer /var/www/manager-dbg -socket manager
+
+make CFLAGS="-g -O2 -DFCGI_SOCKET=\\\"/var/lib/apache2/fastcgi/manager\\\"" || exit
+sudo make install || exit
+
+if [ "$1" == "dbg" ]
+then
+       sudo -u www-data gdb -q /usr/local/libexec/ipsec/manager.fcgi
+else
+       sudo -u www-data /usr/local/libexec/ipsec/manager.fcgi
+fi