src: added proper usage text to piler daemons

Signed-off-by: Janos SUTO <sj@acts.hu>
This commit is contained in:
Janos SUTO 2017-11-30 10:32:14 +01:00
parent b90438bef6
commit 018e6ca07a
2 changed files with 24 additions and 2 deletions

View File

@ -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();
}
}

View File

@ -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();
}
}