50 lines
1.4 KiB
Plaintext
50 lines
1.4 KiB
Plaintext
|
#!/bin/bash -e
|
||
|
|
||
|
. /usr/share/debconf/confmodule
|
||
|
|
||
|
CONFIGFILE="/etc/alternc/local.sh"
|
||
|
|
||
|
case "$1" in
|
||
|
configure)
|
||
|
. "$CONFIGFILE"
|
||
|
|
||
|
# Then, configure the quota for "ssl"
|
||
|
/usr/lib/alternc/quota_init ssl 0
|
||
|
|
||
|
echo "Installing mysql table"
|
||
|
mysql --defaults-file=/etc/alternc/my.cnf < /usr/share/alternc/install/ssl.sql
|
||
|
|
||
|
# Create default quota "ssl" with value 0
|
||
|
mysql --defaults-file=/etc/alternc/my.cnf -Bse "INSERT INTO defquotas VALUES ('ssl', 0, 'default')" || true
|
||
|
|
||
|
echo "installing required apache modules"
|
||
|
a2enmod ssl
|
||
|
|
||
|
echo "$2" >/var/lib/alternc/backups/alternc-ssl-lastversion
|
||
|
|
||
|
echo -e "\033[31m**********************************************"
|
||
|
echo "* *"
|
||
|
echo "* ALTERNC-SSL ACTION REQUESTED *"
|
||
|
echo "* *"
|
||
|
echo "* Please run alternc.install to fully deploy *"
|
||
|
echo "* Then change your quota to activate SSL Cert*"
|
||
|
echo "* *"
|
||
|
echo "**********************************************"
|
||
|
echo -e "\033[0m"
|
||
|
;;
|
||
|
|
||
|
abort-upgrade|abort-remove|abort-deconfigure)
|
||
|
;;
|
||
|
|
||
|
*)
|
||
|
echo "postinst called with unknown argument \`$1'" >&2
|
||
|
exit 1
|
||
|
;;
|
||
|
esac
|
||
|
|
||
|
# dh_installdeb will replace this with shell code automatically
|
||
|
# generated by other debhelper scripts.
|
||
|
#DEBHELPER#
|
||
|
|
||
|
# vim: et sw=4
|