if ((p = getenv("TRIPEDIR")) != 0)
dir = p;
+ if ((p = getenv("TRIPESOCK")) != 0)
+ sock = p;
/* --- Parse the arguments --- */
Makefile \
common/Makefile client/Makefile server/Makefile \
proxy/Makefile pkstream/Makefile \
- doc/Makefile \
+ doc/Makefile doc/tripe.8 doc/tripectl.1 \
wireshark/Makefile \
init/Makefile init/tripe-init \
keys/Makefile keys/tripe-keys \
Tcl, or more advanced clients such as GUI monitors can be written in C
with little difficulty.
.PP
-By default, the server listens for admin connections on the Unix-domain
-socket
-.BR /var/lib/tripe/tripesock .
Administration commands use a textual protocol. Each client command or
server response consists of a line of ASCII text terminated by a single
linefeed character. No command may be longer than 255 characters.
It sets the directory named by the
.B TRIPEDIR
environment variable (or
-.B /var/lib/tripe
+.B "@configdir@"
if the variable is unset) as the current directory.
.hP 2.
It acquires a UDP socket with an arbitrary kernel-selected port number.
.BI "\-d, \-\-directory=" dir
Makes
.I dir
-the current directory, instead of
-.BR /var/lib/tripe .
-Give a current directory of
+the current directory. The default directory to change to is given by
+the environment variable
+.BR TRIPEDIR ;
+if that's not specified, a default default of
+.B "@configdir@"
+is used. Give a current directory of
.B .
if you don't want it to change directory at all.
.TP
.TP
.BI "\-a, \-\-admin\-socket=" socket
Accept admin connections to a Unix-domain socket named
-.I socket
-rather than the default
-.BR tripesock .
+.IR socket .
+The default socket, if this option isn't specified, is given by the
+environment variable
+.BR TRIPESOCK ;
+if that's not set either, then a default default of
+.B "@socketdir@/tripesock"
+is used instead.
.TP
.BI "\-T, \-\-trace=" trace-opts
Allows the enabling or disabling of various internal diagnostics. See
taken from the environment variable
.BR TRIPEDIR ;
if that's not defined either, a default default of
-.BR /var/lib/tripe
+.B "@configdir@"
is used.
.TP
-.BI "\-a, \-\-admin=" socket
+.BI "\-a, \-\-admin-socket=" socket
If connecting to a running server, connect to the socket named
.IR socket ;
if running a new server, instruct it to listen for admin
connections on
.IR socket .
+The default socket, if this option is not specified, is taken from the
+environment variable
+.BR TRIPESOCK ;
+if that's not defined either, a default default of
+.B "@socketdir@/tripesock"
+is used.
.TP
.BI "\-P, \-\-pidfile=" pidfile
Write
[ -f @initconfig@ ] && . @initconfig@
: ${prefix=@prefix@} ${exec_prefix=@exec_prefix@}
: ${bindir=@bindir@} ${sbindir=@sbindir@}
-: ${TRIPEDIR=@configdir@} ${tripesock=@socketdir@/tripesock}
+: ${TRIPEDIR=@configdir@} ${TRIPESOCK=@socketdir@/tripesock}
: ${pidfile=@pidfile@}
: ${tripe=$sbindir/tripe} ${tripectl=$bindir/tripectl}
PATH=/usr/bin:/usr/sbin:/bin:/sbin:$bindir
-export PATH TRIPEDIR
+export PATH TRIPEDIR TRIPESOCK
# --- Give up if there's no key ---
;;
stop)
echo -n "Stopping TrIPE VPN daemon:"
- if test ! -S $tripesock; then
+ if test ! -S $TRIPESOCK; then
echo " not running"
elif $tripectl quit >/dev/null 2>&1; then
echo " done"
elif test ! -f $pidfile; then
echo " stale socket found: removing"
- rm -f $tripesock
+ rm -f $TRIPESOCK
elif kill `cat $pidfile`; then
echo " done (killed violently)"
else
if ((p = getenv("TRIPEDIR")) != 0)
dir = p;
+ if ((p = getenv("TRIPESOCK")) != 0)
+ csock = p;
tun_default = tunnels[0];
for (;;) {