Debian Codegraph @

doc/config/templating.md

raw symbols SCIP
1 Templating
2 ==========
3
4 Finit comes with rudimentary support for templating, similar to that of
5 systemd. Best illustrated with an example:
6
7 $ initctl show avahi-autoipd@
8 service :%i avahi-autoipd --syslog %i -- ZeroConf for %i
9
10 To enable ZeroConf for, e.g., `eth0`, use
11
12 $ initctl enable [email protected]
13
14 The enabled symlink will be set up to `[email protected]` and every
15 instance of `%i` will in the instantiated directive be replaced with
16 `eth0`. Inspect the resulting instantiated template with `initctl show
17 avahi-autoipd:eth0` and check the status of a running instance with:
18
19 ```
20 $ initctl status avahi-autoipd:eth0
21 Status : running
22 Identity : avahi-autoipd:eth0
23 Description : ZeroConf for eth0
24 Origin : /etc/finit.d/enabled/[email protected]
25 Environment : -/etc/default/avahi-autoipd-eth0
26 Command : avahi-autoipd $AVAHI_AUTOIPD_ARGS eth0
27 PID file : /run/avahi-autoipd.eth0.pid
28 PID : 4190
29 User : root
30 Group : root
31 Uptime : 24 sec
32 Restarts : 0 (0/10)
33 Runlevels : [---2345-789]
34 Memory : 20.0k
35 CGroup : /system/avahi-autoipd@eth0 cpu 0 [100, max] mem [0, max]
36 └─ 4190 avahi-autoipd: [eth0] bound 169.254.1.9
37
38 Jul 8 11:51:42 infix-c0-ff-ee finit[1]: Starting avahi-autoipd:eth0[4190]
39 ```