# HG changeset patch # User Christophe Lincoln # Date 1235514043 -3600 # Node ID 30f6e2ccf326c3272718aa17fd9637f8ffb4450a # Parent 443f1bfc5190397ec1438a79094abf6569769014 lighttpd: backup config files diff -r 443f1bfc5190 -r 30f6e2ccf326 lighttpd/receipt --- a/lighttpd/receipt Tue Feb 24 22:24:55 2009 +0100 +++ b/lighttpd/receipt Tue Feb 24 23:20:43 2009 +0100 @@ -59,9 +59,6 @@ cp $_pkg/usr/lib/lighttpd/mod_${module}.so $fs/usr/lib/lighttpd echo -n "Copying : mod_${module}.so" && status done - strip -s $fs/usr/bin/* - strip -s $fs/usr/sbin/* - strip -s $fs/usr/lib/lighttpd/* # Server root and config file. cp -a stuff/var $fs @@ -80,10 +77,19 @@ { echo "Processing pre-install commands..." [ -f /etc/init.d/$PACKAGE ] && /etc/init.d/$PACKAGE stop + # Backup config file. + if [ -d $1/$CONFIG_FILES ]; then + cp -a $1/$CONFIG_FILES $1/$CONFIG_FILES.bak + fi } post_install() { echo "Processing post-install commands..." + # Restore original config. + if [ -d $1/$CONFIG_FILES.bak ]; then + rm -rf $1/$CONFIG_FILES + mv $1/$CONFIG_FILES.bak $1/$CONFIG_FILES + fi # Just in case. chown www.www $1/var/log/$PACKAGE if [ -z "$1" ]; then