mirror of
https://github.com/troglobit/finit.git
synced 2026-10-09 16:50:59 +07:00
Add /lib/finit/sample.conf for initctl create
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
@@ -0,0 +1,45 @@
|
||||
# sample.conf: template run/task/service stanza for finit
|
||||
#
|
||||
# The one-shot commands 'run' and 'task' are called only once per
|
||||
# runlevel. Finit does not restart them when they exit.
|
||||
#
|
||||
# - run : wait for completion before continuing with next stanza
|
||||
# - task : like run but started in background, parallell with other stanzas
|
||||
# - service : supervised daemon, run in foreground, restarted if it crashes
|
||||
#
|
||||
# The env: is an optional path to a file with environment variables to
|
||||
# adjust the behavior of daemons. Debian and Buildroot use /etc/default
|
||||
# while Alpine use /etc/conf.d -- ensure your Finit is built correctly.
|
||||
# The leading '-' determines if its OK to start the service even if the
|
||||
# env file is missing.
|
||||
#
|
||||
# run [LVLS] <COND> log command ARGS -- Command
|
||||
# task [LVLS] <COND> log command ARGS -- Command
|
||||
# service [LVLS] <COND> log env:[-]/etc/default/daemon daemon ARGS -- Daemon daemon
|
||||
# ^ ^ ^ ^ ^ ^ ^ ^
|
||||
# | | | | | | | `-- Optional description
|
||||
# | | | | | | `----------- Daemon arguments
|
||||
# | | | | | `-------------------------- Path to daemon
|
||||
# | | | | `---------------------------------------------------- Optional env. file
|
||||
# | | | `-------------------------------------------------------- Redirect output to log
|
||||
# | | `--------------------------------------------------------------- Optional conditions
|
||||
# | `---------------------------------------------------------------------- Optional Runlevels
|
||||
# `------------------------------------------------------------------------------ Monitored application
|
||||
|
||||
|
||||
# Debian GNU/Linux: start SSH daemon as soon as basic networking comes up
|
||||
#service [2345] <net/lo/up> env:-/etc/default/ssh /usr/sbin/sshd -D $SSHD_OPTS -- OpenSSH daemon
|
||||
|
||||
# Alpine Linux: Oneshot task to run once at bootstrap, yes pipes are possible :)
|
||||
#task [S] env:/etc/conf.d/loadkmap zcat $KEYMAP | loadkmap -- Loading keymap
|
||||
|
||||
# Alpine Linux: start SSH daemon with $DROPBEAR_OPTS from /etc/conf.d
|
||||
#service [2345] env:-/etc/conf.d/dropbear dropbear -R -F $DROPBEAR_OPTS -- Dropbear SSH daemon
|
||||
|
||||
# Handle PWR button to shutdown/reboot -- useful in Qemu (virt-manager)
|
||||
# Depends on syslogd having started. Redirect any output to log.
|
||||
#service [2345] <pid/syslogd> log acpid -f -- ACPI daemon
|
||||
|
||||
# Start rsyslogd as soon as possible, should always run
|
||||
# Provides pid/syslogd condition
|
||||
#service [S12345] name:syslogd env:-/etc/default/rsyslog rsyslogd -n $RSYSLOGD_OPTIONS -- Reliable syslog daemon
|
||||
Reference in New Issue
Block a user