Changeset 1001
- Timestamp:
- 04/14/06 23:31:40 (7 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
-
debian/postinst (modified) (3 diffs)
-
install/upgrades/0.9.5.sh (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/debian/postinst
r999 r1001 7 7 8 8 CONFIGFILE="/etc/alternc/local.sh" 9 MYSQLCONFIG="/etc/alternc/mysql.cnf"10 9 11 10 update_var() { … … 78 77 DEFAULT_MX="" 79 78 80 # Starting with 0.9.5, the MySQL configuration for the support scripts 81 # is stored in /etc/alternc/mysql.cnf 79 # MySQL configuration 82 80 MYSQL_HOST="" 83 81 MYSQL_DATABASE="" … … 124 122 sed -e "$SED_SCRIPT" < $CONFIGFILE > $CONFIGFILE.tmp 125 123 mv -f $CONFIGFILE.tmp $CONFIGFILE 126 127 cat > $MYSQLCONFIG.tmp <<EOF128 # This file is automatically generated129 # and will be overwritten on upgrade.130 [client]131 EOF132 chown root:www-data $MYSQLCONFIG.tmp133 chmod 640 $MYSQLCONFIG.tmp134 135 db_get alternc/mysql/db136 echo "database = $RET" >> $MYSQLCONFIG.tmp137 db_get alternc/mysql/user138 echo "user = $RET" >> $MYSQLCONFIG.tmp139 db_get alternc/mysql/password140 echo "pass = $RET" >> $MYSQLCONFIG.tmp141 db_get alternc/mysql/host142 echo "host = $RET" >> $MYSQLCONFIG.tmp143 144 mv -f $MYSQLCONFIG.tmp $MYSQLCONFIG145 124 146 125 # forget the password -
trunk/install/upgrades/0.9.5.sh
r999 r1001 7 7 chmod 640 /etc/postfix/my* 8 8 rm -f /var/alternc/bureau/admin/adm_list2.php 9 10 TMP=`mktemp`11 TMP2=`mktemp`12 13 if [ ! -e /etc/alternc/mysql.cnf ]; then14 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 16 chgrp www-data "$TMP"17 chmod g+r "$TMP"18 mv "$TMP" /etc/alternc/mysql.cnf19 fi20 21 sed -e 's/^# MySQL configuration$/# Starting with 0.9.5, the MySQL configuration for the support scripts\n# is stored in \/etc\/alternc\/mysql.cnf/' < /etc/alternc/local.sh > "$TMP2"22 chgrp www-data "$TMP2"23 chmod g+r "$TMP2"24 25 mv "$TMP2" /etc/alternc/local.sh
Note: See TracChangeset
for help on using the changeset viewer.
