mirror of
https://github.com/troglobit/finit.git
synced 2026-10-12 10:12:32 +00:00
Fix #155: add support for env:/a/bc to service/run/task
This patch makes it possible to create a service with optional
arguments, similar to the systemd EnvironmentFile= setting.
The major difference to systemd, is that Finit does not attempt
to start a service if it cannot find the env. file, unless it
is prefixed with '-'.
Example:
/etc/default/syslogd:
SYSLOGD_OPTS="-m0 -r 128k:10 -s"
/etc/finit.d/enabled/syslogd.conf
service env:-/etc/default/syslogd syslogd -F $SYSLOGD_OPTS
Only downside, right now, is that changing the contents of the file
/etc/default/syslogd does not mark the syslogd.conf as modified and
a subsequent `initctl reload` will *not* restart syslogd.
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
@@ -494,6 +494,7 @@ static int show_status(char *arg)
|
||||
printf("Service : %s\n", svc->cmd);
|
||||
printf("Description : %s\n", svc->desc);
|
||||
printf("Identity : %s\n", svc_ident(svc, ident, sizeof(ident)));
|
||||
printf("Environment : %s\n", svc->env);
|
||||
printf("PID : %d\n", svc->pid);
|
||||
printf("Uptime : %s\n", svc->pid ? uptime(now - svc->start_time, buf, sizeof(buf)) : buf);
|
||||
printf("Runlevels : %s\n", runlevel_string(runlevel, svc->runlevels));
|
||||
|
||||
Reference in New Issue
Block a user