1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
|
#!/bin/sh
# myphpmoney package configuration script
# Source debconf library -- we have a Depends line
# to make sure it is there...
. /usr/share/debconf/confmodule
db_version 2.0
db_title MyPhpMoney
if [ "$1" = configure -o "$1" = reconfigure ] ; then
db_input "critical" "myphpmoney/configuration" || true
db_go
db_get "myphpmoney/configuration"
if [ "$RET" = "true" ]; then
webservers=""
for i in apache apache-ssl apache-perl apache2 ; do
if [ -x /usr/sbin/$i ] ; then
webservers="$webservers $i"
fi
done
webservers="$(echo $webservers | sed -e 's/ /, /g' -e 's/, *$$//')"
if ! [ -z "$webservers" ] ; then
db_subst "myphpmoney/webservers" webservers "$webservers"
db_input "high" "myphpmoney/webservers" || true
else
db_set "myphpmoney/webservers" ""
fi
db_input "high" "myphpmoney/databasemgr_server" || true
db_input "critical" "myphpmoney/mysql_dbadmin" || true
db_input "critical" "myphpmoney/dbadmpass" || true
db_input "medium" "myphpmoney/mysql_user" || true
db_input "medium" "myphpmoney/database_pass" || true
db_input "medium" "myphpmoney/database_name" || true
db_input "high" "myphpmoney/postrm_remove_database" || true
db_go
fi
fi
exit 0
|