diff options
author | root <root@rshg054.dnsready.net> | 2013-08-13 01:33:19 -0700 |
---|---|---|
committer | root <root@rshg054.dnsready.net> | 2013-08-13 01:33:19 -0700 |
commit | 7a65a910b77ad191d69881098c47f9b0c852d92e (patch) | |
tree | 9564e611af1442f8952a8cbddb3b0ad25ed71aab /community/aiccu/02-allow-tunnels.patch | |
parent | 60da6abff6c9577a783d72865f11de7a585e912e (diff) |
Tue Aug 13 01:31:08 PDT 2013
Diffstat (limited to 'community/aiccu/02-allow-tunnels.patch')
-rw-r--r-- | community/aiccu/02-allow-tunnels.patch | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/community/aiccu/02-allow-tunnels.patch b/community/aiccu/02-allow-tunnels.patch new file mode 100644 index 000000000..ec1c1dade --- /dev/null +++ b/community/aiccu/02-allow-tunnels.patch @@ -0,0 +1,61 @@ +commit d7c4f7c0d34b80c188fa45228ca282fd8771a41d +Author: Norman Rasmussen <norman@rasmussen.co.za> +Date: Sun Jan 10 21:45:55 2010 +0000 + + Allow 'tunnels' mode when there's an already running instance. + +diff --git a/unix-console/main.c b/unix-console/main.c +index 8a4d9a9..388d988 100755 +--- a/unix-console/main.c ++++ b/unix-console/main.c +@@ -50,7 +50,7 @@ int sigrunning(int sig) + /* Close the file again */ + fclose(f); + +- /* If we can HUP it, it still runs */ ++ /* If we can signal it, it still runs */ + return (pid > 0 && kill(pid, sig) == 0 ? 1 : 0); + } + +@@ -302,20 +302,6 @@ int main(int argc, char *argv[]) + return -1; + } + +-#ifndef _WIN32 +- /* start or stop? */ +- if ( mode != A_TEST && +- mode != A_AUTOTEST) +- { +- /* Already running? */ +- if (sigrunning(mode == A_STOP ? SIGTERM : 0) == 1) +- { +- dolog(LOG_ERR, "Already running instance HUP'ed, exiting\n"); +- return 0; +- } +- } +-#endif +- + /* Verify required parameters */ + if (!g_aiccu->username || !g_aiccu->password) + { +@@ -331,6 +317,20 @@ int main(int argc, char *argv[]) + return ret == 0 ? -1 : 0; + } + ++#ifndef _WIN32 ++ /* start or stop? */ ++ if ( mode != A_TEST && ++ mode != A_AUTOTEST) ++ { ++ /* Already running? */ ++ if (sigrunning(mode == A_STOP ? SIGTERM : 0) == 1) ++ { ++ dolog(LOG_ERR, "Already running instance signaled, exiting\n"); ++ return 0; ++ } ++ } ++#endif ++ + /* Get our tunnel */ + hTunnel = get_tunnel(); + |