mirror of
https://bitbucket.org/jsuto/piler.git
synced 2024-12-24 19:20:12 +01:00
src: added proper usage text to piler daemons
Signed-off-by: Janos SUTO <sj@acts.hu>
This commit is contained in:
parent
b90438bef6
commit
018e6ca07a
@ -41,6 +41,17 @@ struct passwd *pwd;
|
||||
struct smtp_session *session, **sessions=NULL;
|
||||
|
||||
|
||||
void usage(){
|
||||
printf("\nusage: piler\n\n");
|
||||
printf(" -c <config file> Config file to use if not the default\n");
|
||||
printf(" -d Fork to the background\n");
|
||||
printf(" -v Return the version and build number\n");
|
||||
printf(" -V Return the version and some build parameters\n");
|
||||
|
||||
exit(0);
|
||||
}
|
||||
|
||||
|
||||
void p_clean_exit(){
|
||||
int i;
|
||||
|
||||
@ -143,7 +154,7 @@ int main(int argc, char **argv){
|
||||
|
||||
case 'h' :
|
||||
default :
|
||||
__fatal("usage: ...");
|
||||
usage();
|
||||
}
|
||||
}
|
||||
|
||||
|
13
src/piler.c
13
src/piler.c
@ -41,6 +41,17 @@ struct passwd *pwd;
|
||||
struct child children[MAXCHILDREN];
|
||||
|
||||
|
||||
void usage(){
|
||||
printf("\nusage: piler\n\n");
|
||||
printf(" -c <config file> Config file to use if not the default\n");
|
||||
printf(" -d Fork to the background\n");
|
||||
printf(" -v Return the version and build number\n");
|
||||
printf(" -V Return the version and some build parameters\n");
|
||||
|
||||
exit(0);
|
||||
}
|
||||
|
||||
|
||||
void takesig(int sig){
|
||||
int i, status;
|
||||
pid_t pid;
|
||||
@ -474,7 +485,7 @@ int main(int argc, char **argv){
|
||||
|
||||
case 'h' :
|
||||
default :
|
||||
__fatal("usage: ...");
|
||||
usage();
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user