summaryrefslogtreecommitdiffabout
path: root/src/genrc.c
Side-by-side diff
Diffstat (limited to 'src/genrc.c') (more/less context) (ignore whitespace changes)
-rw-r--r--src/genrc.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/genrc.c b/src/genrc.c
index 92b0fac..d4904b6 100644
--- a/src/genrc.c
+++ b/src/genrc.c
@@ -43,9 +43,11 @@ struct option longopts[] = {
{ "create-pidfile", required_argument, 0, OPT_CREATE_PIDFILE },
{ "version", no_argument, 0, OPT_VERSION },
{ "verbose", no_argument, 0, 'v' },
+ { "user", required_argument, 0, 'u' },
+ { "group", required_argument, 0, 'g' },
{ NULL }
};
-char shortopts[] = "c:hF:P:p:St:v";
+char shortopts[] = "c:hF:g:P:p:St:u:v";
struct sigdefn {
char const *sig_name;
@@ -386,6 +388,9 @@ main(int argc, char **argv)
setenv("GENRC_PID_FROM", p, 1);
free(p);
break;
+ case 'g':
+ setenv("GENRC_GROUP", optarg, 1);
+ break;
case OPT_CREATE_PIDFILE:
setenv("GENRC_CREATE_PIDFILE", optarg, 1);
break;
@@ -404,6 +409,9 @@ main(int argc, char **argv)
case OPT_SIGNAL_STOP:
setenv("GENRC_SIGNAL_STOP", optarg, 1);
break;
+ case 'u':
+ setenv("GENRC_USER", optarg, 1);
+ break;
case 'v':
genrc_verbose++;
break;

Return to:

Send suggestions and report system problems to the System administrator.