1 Author: Norman Rasmussen <norman@rasmussen.co.za>
3 Make setupscript work and add teardownscript setting.
5 --- aiccu.orig/common/aiccu.c
6 +++ aiccu/common/aiccu.c
8 fprintf(f, "# Try to automatically login and setup the tunnel?\n");
9 fprintf(f, "automatic %s\n", g_aiccu->automatic ? "true" : "false");
11 - fprintf(f, "# Script to run after setting up the interfaces (default: none)\n");
12 - fprintf(f, "%ssetupscript %s\n", g_aiccu->setupscript ? "" : "#", g_aiccu->setupscript ? g_aiccu->setupscript : "<path>");
14 fprintf(f, "# TLS Required?\n");
15 fprintf(f, "requiretls %s\n", g_aiccu->requiretls ? "true" : "false");
18 fprintf(f, "# PID File\n");
19 fprintf(f, "pidfile %s\n", g_aiccu->pidfile);
21 + fprintf(f, "# Script to run after setting up the interfaces (default: none)\n");
22 + fprintf(f, "%ssetupscript %s\n", g_aiccu->setupscript ? "" : "#", g_aiccu->setupscript ? g_aiccu->setupscript : "<path>");
24 fprintf(f, "# Make heartbeats (default true)\n");
25 fprintf(f, "# In general you don't want to turn this off\n");
26 fprintf(f, "# Of course only applies to AYIYA and heartbeat tunnels not to static ones\n");
27 --- aiccu.orig/unix-console/main.c
28 +++ aiccu/unix-console/main.c
31 if (aiccu_setup(hTunnel, true))
33 + if (g_aiccu->setupscript)
35 + aiccu_exec("%s", g_aiccu->setupscript);
38 /* We need to stay running when doing Heartbeat or AYIYA */
39 if ( strcasecmp(hTunnel->sType, "6in4-heartbeat") == 0 ||
40 strcasecmp(hTunnel->sType, "ayiya") == 0)