aboutsummaryrefslogtreecommitdiffstats
path: root/conf.c
diff options
context:
space:
mode:
authorWilmer van der Gaast <wilmer@gaast.net>2006-01-21 23:31:10 +0100
committerWilmer van der Gaast <wilmer@gaast.net>2006-01-21 23:31:10 +0100
commit54879ab3b2cbcaf1c9114bddd85ec5d4dc097915 (patch)
tree34cc9e33fc6343fd90141aa0b1faaee57debbe61 /conf.c
parentf73b9697f9be18e04ec7458634520f9dd2e2432f (diff)
parentf1d38f20f760376f43b90a105486cf3ff2fbf2c4 (diff)
Added RESTART command (only for ForkDaemon mode) for easier upgrades.
Diffstat (limited to 'conf.c')
-rw-r--r--conf.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/conf.c b/conf.c
index ae4b77a2..d90816d5 100644
--- a/conf.c
+++ b/conf.c
@@ -31,6 +31,7 @@
#include "conf.h"
#include "ini.h"
#include "url.h"
+#include "ipc.h"
#include "protocols/proxy.h"
@@ -76,7 +77,7 @@ conf_t *conf_load( int argc, char *argv[] )
fprintf( stderr, "Warning: Unable to read configuration file `%s'.\n", CONF_FILE );
}
- while( argc > 0 && ( opt = getopt( argc, argv, "i:p:nvIDFc:d:h" ) ) >= 0 )
+ while( argc > 0 && ( opt = getopt( argc, argv, "i:p:nvIDFc:d:hR:" ) ) >= 0 )
/* ^^^^ Just to make sure we skip this step from the REHASH handler. */
{
if( opt == 'i' )
@@ -141,6 +142,14 @@ conf_t *conf_load( int argc, char *argv[] )
" -h Show this help page.\n" );
return( NULL );
}
+ else if( opt == 'R' )
+ {
+ /* We can't load the statefile yet (and should make very sure we do this
+ only once), so set the filename here and load the state information
+ when initializing ForkDaemon. (This option only makes sense in that
+ mode anyway!) */
+ ipc_master_set_statefile( optarg );
+ }
}
if( conf->configdir[strlen(conf->configdir)-1] != '/' )