|
Lines 66-71
void usage(void)
Link Here
|
| 66 |
fprintf(stderr, "Usage: univention-directory-notifier [options]\n"); |
66 |
fprintf(stderr, "Usage: univention-directory-notifier [options]\n"); |
| 67 |
fprintf(stderr, "Options:\n"); |
67 |
fprintf(stderr, "Options:\n"); |
| 68 |
fprintf(stderr, " -F run in foreground (intended for process supervision)\n"); |
68 |
fprintf(stderr, " -F run in foreground (intended for process supervision)\n"); |
|
|
69 |
fprintf(stderr, " -l path to logfile (or \"stderr\")\n"); |
| 69 |
fprintf(stderr, " -o DEPRECATED\n"); |
70 |
fprintf(stderr, " -o DEPRECATED\n"); |
| 70 |
fprintf(stderr, " -r DEPRECATED\n"); |
71 |
fprintf(stderr, " -r DEPRECATED\n"); |
| 71 |
fprintf(stderr, " -s DEPRECATED\n"); |
72 |
fprintf(stderr, " -s DEPRECATED\n"); |
|
Lines 154-159
int main(int argc, char* argv[])
Link Here
|
| 154 |
|
155 |
|
| 155 |
int foreground = 0; |
156 |
int foreground = 0; |
| 156 |
int debug = 0; |
157 |
int debug = 0; |
|
|
158 |
char *notifier_log_file = "/var/log/univention/notifier.log"; |
| 157 |
|
159 |
|
| 158 |
|
160 |
|
| 159 |
SCHEMA_ID=0; |
161 |
SCHEMA_ID=0; |
|
Lines 162-168
int main(int argc, char* argv[])
Link Here
|
| 162 |
int c; |
164 |
int c; |
| 163 |
char *end; |
165 |
char *end; |
| 164 |
|
166 |
|
| 165 |
c = getopt(argc, argv, "Fosrd:S:C:L:T:v:"); |
167 |
c = getopt(argc, argv, "Fosrd:l:S:C:L:T:v:"); |
| 166 |
if (c < 0) |
168 |
if (c < 0) |
| 167 |
break; |
169 |
break; |
| 168 |
|
170 |
|
|
Lines 188-193
int main(int argc, char* argv[])
Link Here
|
| 188 |
case 'T': |
190 |
case 'T': |
| 189 |
notifier_lock_time=atoll(optarg); |
191 |
notifier_lock_time=atoll(optarg); |
| 190 |
break; |
192 |
break; |
|
|
193 |
case 'l': |
| 194 |
notifier_log_file = optarg; |
| 195 |
break; |
| 191 |
case 'v': |
196 |
case 'v': |
| 192 |
network_procotol_version = strtoll(optarg, &end, 10); |
197 |
network_procotol_version = strtoll(optarg, &end, 10); |
| 193 |
if (!*optarg || *end || network_procotol_version < PROTOCOL_1 || network_procotol_version >= PROTOCOL_LAST) |
198 |
if (!*optarg || *end || network_procotol_version < PROTOCOL_1 || network_procotol_version >= PROTOCOL_LAST) |
|
Lines 203-209
int main(int argc, char* argv[])
Link Here
|
| 203 |
daemon(1,1); |
208 |
daemon(1,1); |
| 204 |
} |
209 |
} |
| 205 |
|
210 |
|
| 206 |
univention_debug_init("/var/log/univention/notifier.log",1,1); |
211 |
univention_debug_init(notifier_log_file, 1, 1); |
| 207 |
univention_debug_set_level(UV_DEBUG_TRANSFILE, debug); |
212 |
univention_debug_set_level(UV_DEBUG_TRANSFILE, debug); |
| 208 |
|
213 |
|
| 209 |
if ( creating_pidfile("/var/run/udsnotifier.pid") != 0 ) |
214 |
if ( creating_pidfile("/var/run/udsnotifier.pid") != 0 ) |