-
Notifications
You must be signed in to change notification settings - Fork 1
/
demo.conf
93 lines (78 loc) · 1.47 KB
/
demo.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
task print_hello = start_stop
{
start = command
{
cmd = "/bin/echo 'welcome to initd demo'",
},
stop = command
{
cmd = "/bin/false",
},
};
task print_hostname_before = start_stop
{
start = command
{
cmd = "/bin/hostname",
},
stop = command
{
cmd = "/bin/hostname",
},
};
task initialize_hostname = sethostname
{
hostname = "initd-demo",
no_restore = false
};
task print_hostname_after = start_stop
{
start = command
{
cmd = "/bin/hostname",
},
stop = command
{
cmd = "/bin/hostname",
},
};
task task_1 = start_stop
{
start = command
{
cmd = "/bin/echo 'task 1 started'",
},
stop = command
{
cmd = "/bin/echo 'task 1 stopped'",
},
};
task task_2 = start_stop
{
start = command
{
cmd = "/bin/echo 'task 2 started'",
},
stop = command
{
cmd = "/bin/echo 'task 2 stopped'",
},
};
task task_3 = start_stop
{
start = command
{
cmd = "/bin/echo 'task 3 started'",
},
stop = command
{
cmd = "/bin/echo 'task 3 stopped'",
},
};
print_hostname_before depends print_hello;
initialize_hostname depends print_hostname_before;
print_hostname_after depends initialize_hostname;
task_1 depends initialize_hostname;
task_2 depends initialize_hostname;
task_3 depends initialize_hostname;
run_level default : print_hostname_after, task_1, task_2, task_3;