Changeset 999
- Timestamp:
- 04/08/06 00:17:05 (2 years ago)
- Files:
-
- trunk/debian/postinst (modified) (3 diffs)
- trunk/install/upgrades/0.9.5.sh (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/debian/postinst
r951 r999 7 7 8 8 CONFIGFILE="/etc/alternc/local.sh" 9 MYSQLCONFIG="/etc/alternc/mysql.cnf" 9 10 10 11 update_var() { … … 77 78 DEFAULT_MX="" 78 79 79 # MySQL configuration 80 # Starting with 0.9.5, the MySQL configuration for the support scripts 81 # is stored in /etc/alternc/mysql.cnf 80 82 MYSQL_HOST="" 81 83 MYSQL_DATABASE="" … … 122 124 sed -e "$SED_SCRIPT" < $CONFIGFILE > $CONFIGFILE.tmp 123 125 mv -f $CONFIGFILE.tmp $CONFIGFILE 126 127 cat > $MYSQLCONFIG.tmp <<EOF 128 # This file is automatically generated 129 # and will be overwritten on upgrade. 130 [client] 131 EOF 132 chown root:www-data $MYSQLCONFIG.tmp 133 chmod 640 $MYSQLCONFIG.tmp 134 135 db_get alternc/mysql/db 136 echo "database = $RET" >> $MYSQLCONFIG.tmp 137 db_get alternc/mysql/user 138 echo "user = $RET" >> $MYSQLCONFIG.tmp 139 db_get alternc/mysql/password 140 echo "pass = $RET" >> $MYSQLCONFIG.tmp 141 db_get alternc/mysql/host 142 echo "host = $RET" >> $MYSQLCONFIG.tmp 143 144 mv -f $MYSQLCONFIG.tmp $MYSQLCONFIG 124 145 125 146 # forget the password trunk/install/upgrades/0.9.5.sh
r998 r999 12 12 13 13 if [ ! -e /etc/alternc/mysql.cnf ]; then 14 grep '^MYSQL_.*$' /etc/alternc/local.sh | sed -e '1 i [client]' -e '/^MYSQL_HOST.*$/ d' -e 's/^MYSQL_CLIENT/MYSQL_HOST/' -e 's/"//g' -e 's/=/ = /g' -e 's/MYSQL_//g' -e 's/^[^=]*/\L\0/' > "$TMP"14 grep '^MYSQL_.*$' /etc/alternc/local.sh | sed -e '1 i# This file is automatically generated\n# and will be overwritten on upgrade.\n[client]' -e '/^MYSQL_CLIENT.*$/ d' -e 's/"//g' -e 's/=/ = /g' -e 's/MYSQL_//g' -e 's/^[^=]*/\L\0/' > "$TMP" 15 15 16 16 chgrp www-data "$TMP"
