Changeset 34b17d9
- Timestamp:
- 2006-02-02T13:21:44Z (19 years ago)
- Branches:
- master
- Children:
- 1d2e3c2
- Parents:
- 8365610
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
bitlbee.c
r8365610 r34b17d9 45 45 int i; 46 46 GIOChannel *ch; 47 FILE *fp; 47 48 48 49 log_link( LOGLVL_ERROR, LOGOUTPUT_SYSLOG ); … … 111 112 #endif 112 113 114 if( ( fp = fopen( global.conf->pidfile, "w" ) ) ) 115 { 116 fprintf( fp, "%d\n", (int) getpid() ); 117 fclose( fp ); 118 } 119 else 120 { 121 log_message( LOGLVL_WARNING, "Warning: Couldn't write PID to `%s'", global.conf->pidfile ); 122 } 123 113 124 return( 0 ); 114 125 } -
conf.c
r8365610 r34b17d9 61 61 conf->configdir = g_strdup( CONFIG ); 62 62 conf->plugindir = g_strdup( PLUGINDIR ); 63 conf->pidfile = g_strdup( "/var/run/bitlbee.pid" ); 63 64 conf->motdfile = g_strdup( ETCDIR "/motd.txt" ); 64 65 conf->ping_interval = 180; … … 77 78 } 78 79 79 while( argc > 0 && ( opt = getopt( argc, argv, "i:p: nvIDFc:d:h" ) ) >= 0 )80 while( argc > 0 && ( opt = getopt( argc, argv, "i:p:P:nvIDFc:d:h" ) ) >= 0 ) 80 81 /* ^^^^ Just to make sure we skip this step from the REHASH handler. */ 81 82 { … … 92 93 } 93 94 conf->port = i; 95 } 96 else if( opt == 'p' ) 97 { 98 g_free( conf->pidfile ); 99 conf->pidfile = g_strdup( optarg ); 94 100 } 95 101 else if( opt == 'n' ) … … 175 181 else 176 182 conf->runmode = RUNMODE_INETD; 183 } 184 else if( g_strcasecmp( ini->key, "pidfile" ) == 0 ) 185 { 186 g_free( conf->pidfile ); 187 conf->pidfile = g_strdup( ini->value ); 177 188 } 178 189 else if( g_strcasecmp( ini->key, "daemoninterface" ) == 0 ) -
conf.h
r8365610 r34b17d9 43 43 char *configdir; 44 44 char *plugindir; 45 char *pidfile; 45 46 char *motdfile; 46 47 char *primary_storage; -
configure
r8365610 r34b17d9 14 14 datadir='$prefix/share/bitlbee/' 15 15 config='/var/lib/bitlbee/' 16 pidfile='/var/run/bitlbee.pid' 16 17 plugindir='$prefix/lib/bitlbee' 17 18 … … 46 47 --datadir=... $datadir 47 48 --plugindir=... $plugindir 49 --pidfile=... $pidfile 48 50 --config=... $config 49 51 … … 74 76 config=`eval echo "$config/" | sed 's/\/\{1,\}/\//g'` 75 77 plugindir=`eval echo "$plugindir/" | sed 's/\/\{1,\}/\//g'` 78 pidfile=`eval echo "$pidfile/" | sed 's/\/\{1,\}/\//g'` 76 79 77 80 cat<<EOF>Makefile.settings … … 83 86 DATADIR=$datadir 84 87 PLUGINDIR=$plugindir 88 PIDFILE=$pidfile 85 89 CONFIG=$config 86 90 … … 104 108 #define VARDIR "$datadir" 105 109 #define PLUGINDIR "$plugindir" 110 #define PIDFILE "$pidfile" 106 111 #define ARCH "$arch" 107 112 #define CPU "$cpu"
Note: See TracChangeset
for help on using the changeset viewer.