mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-21 05:11:29 +00:00
add debianization scripts based on work by Florent USSEIL
This commit is contained in:
42
debian/tt-rss-mysql.postrm
vendored
Normal file
42
debian/tt-rss-mysql.postrm
vendored
Normal file
@@ -0,0 +1,42 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
PACKAGE=tt-rss-mysql
|
||||
|
||||
# source debconf stuff
|
||||
if [ -f /usr/share/debconf/confmodule ]; then
|
||||
. /usr/share/debconf/confmodule
|
||||
fi
|
||||
|
||||
# Un-configure and restart webservers
|
||||
db_get $PACKAGE/webserver || true
|
||||
WEBSERVER="$RET";
|
||||
if $WEBSERVER; then
|
||||
if [ -L /etc/apache2/conf.d/$PACKAGE.conf ]; then
|
||||
rm -f /etc/apache2/conf.d/$PACKAGE.conf
|
||||
fi
|
||||
fi
|
||||
|
||||
if apache2ctl configtest 2>/dev/null; then
|
||||
invoke-rc.d apache2 force-reload || true
|
||||
else
|
||||
echo "apache need to be manually reloaded"
|
||||
fi
|
||||
|
||||
# dbconfig-common
|
||||
if [ -f /usr/share/dbconfig-common/dpkg/postrm.mysql ]; then
|
||||
. /usr/share/dbconfig-common/dpkg/postrm.mysql
|
||||
dbc_go $PACKAGE $@
|
||||
fi
|
||||
|
||||
if [ "$1" = "purge" ]; then
|
||||
# remove database config
|
||||
rm -f /etc/$PACKAGE/database.php
|
||||
if which ucf >/dev/null 2>&1; then
|
||||
ucf --purge /etc/$PACKAGE/database.php
|
||||
fi
|
||||
db_purge
|
||||
fi
|
||||
|
||||
exit 0
|
||||
#DEBHELPER#
|
||||
Reference in New Issue
Block a user