summaryrefslogtreecommitdiff
path: root/dh_installinit
diff options
context:
space:
mode:
Diffstat (limited to 'dh_installinit')
-rwxr-xr-xdh_installinit24
1 files changed, 5 insertions, 19 deletions
diff --git a/dh_installinit b/dh_installinit
index a79113ab..087a3bd8 100755
--- a/dh_installinit
+++ b/dh_installinit
@@ -219,37 +219,26 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
my $service=pkgfile($package,"service");
if ($service ne '' && ! $dh{ONLYSCRIPTS}) {
my $path="$tmp/lib/systemd/system";
- if (! -d $path) {
- install_dir($path);
- }
-
+ install_dir($path);
install_file($service, "$path/$script.service");
}
my $tmpfile=pkgfile($package,"tmpfile");
if ($tmpfile ne '' && ! $dh{ONLYSCRIPTS}) {
my $path="$tmp/usr/lib/tmpfiles.d";
- if (! -d $path) {
- install_dir($path);
- }
-
+ install_dir($path);
install_file($tmpfile, "$path/$script.conf");
}
my $job=pkgfile($package,"upstart");
if ($job ne '' && ! $dh{ONLYSCRIPTS}) {
- if (! -d "$tmp/etc/init") {
- install_dir("$tmp/etc/init");
- }
-
+ install_dir("$tmp/etc/init");
install_file($job, "$tmp/etc/init/$jobfile.conf");
}
my $default=pkgfile($package,'default');
if ($default ne '' && ! $dh{ONLYSCRIPTS}) {
- if (! -d "$tmp/etc/default") {
- install_dir("$tmp/etc/default");
- }
+ install_dir("$tmp/etc/default");
install_file($default, "$tmp/etc/default/$script");
}
@@ -257,10 +246,7 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
pkgfile($package,"init.d");
if ($init ne '' && ! $dh{ONLYSCRIPTS}) {
- if (! -d "$tmp/etc/init.d") {
- install_dir("$tmp/etc/init.d");
- }
-
+ install_dir("$tmp/etc/init.d");
install_prog($init,"$tmp/etc/init.d/$script");
}