diff options
Diffstat (limited to 'dh_runit')
-rwxr-xr-x | dh_runit | 17 |
1 files changed, 11 insertions, 6 deletions
@@ -72,11 +72,14 @@ PKG: foreach my $pkg (@{$dh{DOPACKAGES}}) { | |||
72 | "/var/lib/runit/supervise/$name", $tmp); | 72 | "/var/lib/runit/supervise/$name", $tmp); |
73 | install_dir("$tmp/var/lib/runit/supervise/$name"); | 73 | install_dir("$tmp/var/lib/runit/supervise/$name"); |
74 | 74 | ||
75 | if ($conf->{enable}) { | 75 | my $substitutions = { |
76 | make_symlink("/etc/runit/runsvdir/default/$name", | 76 | NAME => $name, |
77 | "/etc/sv/$name", $tmp); | 77 | ENABLE => $conf->{enable} ? "yes" : "no" |
78 | } | 78 | }; |
79 | runit_autoscript($pkg, 'postrm', "s/#NAME#/$name/"); | 79 | |
80 | runit_autoscript($pkg, 'postrm', $substitutions); | ||
81 | runit_autoscript($pkg, 'postinst', $substitutions); | ||
82 | |||
80 | if ($conf->{logscript}) { | 83 | if ($conf->{logscript}) { |
81 | my $logdir = "/var/log/runit/$name"; | 84 | my $logdir = "/var/log/runit/$name"; |
82 | 85 | ||
@@ -100,7 +103,7 @@ HERE | |||
100 | } | 103 | } |
101 | } | 104 | } |
102 | addsubstvar($pkg, 'misc:Depends', 'runit', '>= 2.1.2-7'); | 105 | addsubstvar($pkg, 'misc:Depends', 'runit', '>= 2.1.2-7'); |
103 | addsubstvar($pkg, 'misc:Depends', 'runit-helper'); | 106 | addsubstvar($pkg, 'misc:Depends', 'runit-helper', '>= 2.7.3'); |
104 | } | 107 | } |
105 | 108 | ||
106 | # PROMISE: DH NOOP WITHOUT runit | 109 | # PROMISE: DH NOOP WITHOUT runit |
@@ -184,3 +187,5 @@ This section contains several example snippets from F<I<package>.runit> | |||
184 | path/to/directory name=my-preferred-name,logscript | 187 | path/to/directory name=my-preferred-name,logscript |
185 | 188 | ||
186 | =cut | 189 | =cut |
190 | |||
191 | # vim: et:sw=4 | ||