Skip to content

Commit

Permalink
Rename -D to -z
Browse files Browse the repository at this point in the history
  • Loading branch information
gjedeer committed Sep 28, 2023
1 parent 78af9ee commit ea396ac
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ Alternatively you may use the -C switch instead:

./tuntox -C /path/to/the/config/directory/

To daemonize on startup, add -D:
To daemonize on startup, add -z:

/path/to/tuntox -D
/path/to/tuntox -z

Or, if you run something like supervisord or systemd, you're welcome to contribute a configuration file for the system of your choice (see #3, #4, #6). There's absolutely no need to run the server as root.

Expand Down
2 changes: 1 addition & 1 deletion gitversion.h
Original file line number Diff line number Diff line change
@@ -1 +1 @@
#define GITVERSION "0cc717d070a3ea74562cbcea01165c38d2e9bb87"
#define GITVERSION "d20725aee450754cc86e8fa1410bbb591561eeda"
8 changes: 4 additions & 4 deletions main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1164,7 +1164,7 @@ static void child_handler(int signum)
}

/*
* Daemonize the process if -D is set
* Daemonize the process if -z is set
* Optionally drop privileges and create a lock file
*/
void do_daemonize()
Expand Down Expand Up @@ -1398,7 +1398,7 @@ void help()
fprintf(stdout, " -d - debug mode (use twice to display toxcore log too)\n");
fprintf(stdout, " -q - quiet mode\n");
fprintf(stdout, " -S - send output to syslog instead of stdout\n");
fprintf(stdout, " -D - daemonize (fork) and exit (implies -S)\n");
fprintf(stdout, " -z - daemonize (fork) and exit (implies -S)\n");
fprintf(stdout, " -F <path> - create a PID file named <path>\n");
fprintf(stdout, " -U <username|userid> - drop privileges to <username> before forking. Use\n");
fprintf(stdout, " numeric <userid> in static builds.\n");
Expand Down Expand Up @@ -1431,7 +1431,7 @@ int main(int argc, char *argv[])

log_init();

while ((oc = getopt(argc, argv, "L:pi:I:C:s:f:W:dqhSF:DU:t:u:b:V")) != -1)
while ((oc = getopt(argc, argv, "L:pi:I:C:s:f:W:dqhSF:DzU:t:u:b:V")) != -1)
{
switch(oc)
{
Expand Down Expand Up @@ -1553,7 +1553,7 @@ int main(int argc, char *argv[])
case 'S':
use_syslog = 1;
break;
case 'D':
case 'z':
daemonize = 1;
use_syslog = 1;
break;
Expand Down
2 changes: 1 addition & 1 deletion scripts/tuntox.debian-init
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ NAME=tuntox
DAEMON=/usr/bin/$NAME
DAEMON_CFG_DIR=/etc/tuntox/
PIDFILE=/var/run/$NAME/$NAME.pid
DAEMON_ARGS="-C $DAEMON_CFG_DIR -D -F $PIDFILE -U $USERID -d"
DAEMON_ARGS="-C $DAEMON_CFG_DIR -z -F $PIDFILE -U $USERID -d"
SCRIPTNAME=/etc/init.d/$NAME

# Exit if packages not installed
Expand Down

0 comments on commit ea396ac

Please sign in to comment.