Guus Sliepen
d917c8cb6b
Fix whitespace.
2012-10-10 17:17:49 +02:00
Guus Sliepen
d93a37928b
Fix warnings from cppcheck.
2012-10-07 17:53:23 +02:00
Guus Sliepen
ef9358c0d6
Improve starting/stopping tincd using tincctl.
...
When starting tincd, tincctl now strips non-options from the command line, and
sets argv[0] to the name of the tincd command instead of copying its own
command name.
When stopping a running tincd, tincctl now waits for it to terminate.
2012-10-06 17:45:03 +02:00
Guus Sliepen
e971130b60
Make tincctl robust against dropped control connections.
2012-09-28 17:36:25 +02:00
Guus Sliepen
f70cbc9d3e
Comment out old public/private keys when generating new ones.
2012-09-27 15:45:02 +02:00
Guus Sliepen
1f312137d5
Allow dumping either directed or undirected graphs.
...
Internally, tinc maintains a directed graph of the meta connections between
nodes. However, this causes graphviz to draw two lines between nodes, which is
not always desirable. The "dump graph" command now defaults to dumping an
undirected graph, the "dump digraph" command will dump a directed graph.
2012-09-26 23:52:36 +02:00
Guus Sliepen
d6388d782e
Let tincctl parse and format dumps.
...
At the moment it just reproduces the old format.
2012-09-26 23:18:32 +02:00
Guus Sliepen
d74b81b61e
Fix node name check for "connect" and "disconnect" commands.
2012-08-30 14:00:34 +02:00
Guus Sliepen
5567c0d410
Quit when "exit" or "quit" commands are used in tincctl's shell.
2012-08-05 17:25:31 +02:00
Guus Sliepen
d18519ae21
Fix segfault when using tincctl's shell without readline.
2012-08-05 17:03:57 +02:00
Guus Sliepen
a57db1dfe0
Fork when using the "start" command in tincctl.
...
This allows the command to be given in its shell without immediatly exiting tincctl.
2012-08-03 14:15:50 +02:00
Guus Sliepen
36c6afede3
Add readline completion for tincctl config and tincctl info.
2012-08-03 13:23:07 +02:00
Guus Sliepen
73348be58e
Have tincctl act as a shell when no command is given.
...
By default it uses readline to read commands. If the input and output are not a
tty, no prompt is shown.
2012-08-02 17:24:42 +02:00
Guus Sliepen
6396f42d74
Stricter checks for netname and node names.
...
- Node names should not be empty.
- Net names should not contain slashes or start with a dot, because they are
used in pathnames.
2012-08-01 16:51:59 +02:00
Guus Sliepen
61006ced88
Add missing configuration variables.
2012-08-01 16:13:23 +02:00
Guus Sliepen
b0f3a76e9b
Add the ability to query configuration variables to tincctl.
2012-08-01 15:53:20 +02:00
Guus Sliepen
a9caa2a6ea
tincctl restart should work even if no tincd is running.
2012-08-01 15:15:37 +02:00
Guus Sliepen
07980b056c
Try sending SIGTERM if we cannot connect to a tincd but we know its PID.
2012-08-01 15:14:48 +02:00
Guus Sliepen
2b97a7d7cf
tincctl init now also creates a template tinc-up script.
2012-07-22 12:52:31 +02:00
Guus Sliepen
e5e96882c3
Windows doesn't like quotes around "edit" when calling it through system().
...
Even though that works fine on the command line.
2012-07-21 16:33:09 +02:00
Guus Sliepen
18237e1f2d
Use backslashes on Windows.
...
Although Windows itself supports the forward slash, some programs may not.
2012-07-21 16:26:55 +02:00
Guus Sliepen
09a8ff649c
Don't try to mkdir(CONFDIR) on Windows when there is a registry key for tinc.
2012-07-21 15:58:16 +02:00
Guus Sliepen
ed8ce60845
Fix crash when no netname is specified.
2012-07-21 15:51:15 +02:00
Guus Sliepen
7303b512b0
Fix some compiler warnings.
2012-07-21 15:50:50 +02:00
Guus Sliepen
33521eabd4
Have tincd and tincctl use the same method of determining netname.
2012-07-21 15:15:04 +02:00
Guus Sliepen
1d322d2eda
Add a newline to a configuration file if it is missing.
2012-07-21 15:02:44 +02:00
Guus Sliepen
dea722c4ac
Add some checks when changing configuration.
2012-07-21 15:02:17 +02:00
Guus Sliepen
4e0fc52197
Fix various compiler warnings.
2012-07-21 13:53:22 +02:00
Guus Sliepen
5eeed38b8e
Make sure tinc compiles on Windows.
2012-07-21 12:51:53 +02:00
Guus Sliepen
68de7b481e
When exporting configuration files, don't copy Name variables.
...
These interfere with tincctl import. Besides, host configuration files should
not contain Name at all.
2012-07-16 18:49:39 +02:00
Guus Sliepen
c52c46f871
Add an easy way to export and import host configuration files.
2012-07-16 16:48:24 +02:00
Guus Sliepen
53735a9d96
"tincctl info" gives more human readable information about nodes or subnets.
2012-07-16 01:05:25 +02:00
Guus Sliepen
e72e6febfe
Fix tincctl dump.
2012-07-15 22:53:03 +02:00
Guus Sliepen
9be8980a2b
Let tincctl ignore tincd options, so they will be passed on.
2012-07-15 21:17:10 +02:00
Guus Sliepen
36dee4c539
Fix tincctl start.
2012-07-15 21:15:35 +02:00
Guus Sliepen
439069bda6
Have tincctl notify a running tincd of configuration file changes.
2012-07-15 20:59:17 +02:00
Guus Sliepen
eb01fd9625
Add an easy way to edit a configuration file.
2012-07-15 20:37:38 +02:00
Guus Sliepen
cedfeccb24
Stricter checks for node names.
2012-07-15 20:22:21 +02:00
Guus Sliepen
03f72c6173
Allow configuration variables to be added/removed using tincctl.
2012-07-15 18:16:35 +02:00
Guus Sliepen
dd102efd24
Put every command in its own function.
2012-07-15 15:46:16 +02:00
Guus Sliepen
a444ec3964
"tincctl init" creates initial directory structure, tinc.conf and keypairs.
2012-07-15 14:49:36 +02:00
Guus Sliepen
8ac096b5bf
Allow log messages to be captured by tincctl.
...
This allows tincctl to receive log messages from a running tincd,
independent of what is logged to syslog or to file. Tincctl can receive
debug messages with an arbitrary level.
2012-02-26 18:37:36 +01:00
Guus Sliepen
344d6b9ac3
Let tincctl use the NETNAME environment variable if no -n option is given.
...
This allows administrators who frequently want to work with one tinc
network to omit the -n option. Since the NETNAME variable is set by
tincd when executing scripts, this makes it slightly easier to use
tincctl from within scripts.
2012-02-26 13:08:34 +01:00
Guus Sliepen
b50d6a7f2a
Fix compiler warnings.
2011-12-26 23:04:40 +01:00
Michael Tokarev
bbc0ba9e87
use execvp() not execve() in tincctl start
...
sometimes argv[0] will have directory-less name (when the
command is started by shell searching in $PATH for example).
For tincctl start we want the same rules to run tincd as for
tincctl itself (having full path is better but if shell does
not provide one we've no other choice). Previous code tried
to run ./tincd in this case, which is obviously wrong.
This is a fix for the previous commit.
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2011-08-07 10:51:21 +02:00
Michael Tokarev
a7556a9d2c
run tincd from the same directory as tincctl and pass all options to it
...
For tincctl start, run tincd from dirname($0) not SBINDIR -
this allows painless alternative directory installation and
running from build directory too.
Also while at it, pass the rest of command line to tincd, not
only options before "start" argument. This way it's possible
to pass options to tincd like this:
tincctl -n net start -- -d 1 -R -U tincuser ...
And also add missing newline at the end of error message there.
Signed-Off-By: Michael Tokarev <mjt@tls.msk.ru>
2011-08-07 10:12:43 +02:00
Michael Tokarev
2696ad2cca
don't mention reload twice in tincctl help
...
Signed-Off-By: Michael Tokarev <mjt@tls.msk.ru>
2011-08-07 10:12:38 +02:00
Guus Sliepen
c259d552fa
Add missing newline.
2011-07-17 20:06:06 +02:00
Guus Sliepen
25091454da
"tincctl stop" now removes the tinc service on Windows.
2011-07-17 19:23:52 +02:00
Guus Sliepen
303dd1e702
Fix compiler warnings.
2011-07-13 22:52:52 +02:00