Permalink
Browse files

Various packaging tweaks.

  • Loading branch information...
1 parent 0080838 commit 51f26834746ac3b7991995acb35df25e6ff342c9 @gphat committed Feb 7, 2012
Showing with 11 additions and 5 deletions.
  1. +2 −1 Changes
  2. +9 −4 lib/Dist/Zilla/Plugin/Dpkg/PerlbrewStarman.pm
View
@@ -1,8 +1,9 @@
Revision history for Dist-Zilla-Plugin-Dpkg-PerlbrewStarman
{{$NEXT}}
- - Restart nginx after installation / upgrade
- Add config file to conffiles
+ - Add init script to conffiles (per debian policy at http://www.debian.org/doc/debian-policy/ch-opersys.html)
+ - Add restart of nginx
0.07 Jan 20 2012
@@ -46,6 +46,8 @@ This module provides defaults for the following attribute:
=over 4
+=item conffiles_template_default
+
=item default_template_default
=item init_template_default
@@ -62,6 +64,7 @@ This module provides defaults for the following attribute:
has '+conffiles_template_default' => (
default => '/etc/default/{$package_name}
+/etc/init.d/{$package_name}
'
);
@@ -258,7 +261,7 @@ case "$1" in
ln -s /srv/$PACKAGE/config /etc/$PACKAGE
fi
- # Symlink to the nginx config for the senvironment we`re in
+ # Symlink to the nginx config for the environment we`re in
if [ ! -e /etc/nginx/sites-available/$PACKAGE ]; then
ln -s /srv/$PACKAGE/config/nginx/$PACKAGE.conf /etc/nginx/sites-available/$PACKAGE
fi
@@ -282,9 +285,11 @@ case "$1" in
chown -R $PACKAGE:adm /var/log/$PACKAGE
fi
- # Restart nginx. I dont see a specific upgrade step in debian for this
- # so Im just doing it here
- /etc/init.d/nginx restart
+ if which invoke-rc.d >/dev/null 2>&1; then
+ invoke-rc.d nginx restart
+ else
+ /etc/init.d/nginx restart
+ fi
;;
abort-upgrade|abort-remove|abort-deconfigure)

0 comments on commit 51f2683

Please sign in to comment.