Changeset 1001


Ignore:
Timestamp:
04/14/06 23:31:40 (7 years ago)
Author:
joe
Message:

Renversement

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/debian/postinst

    r999 r1001  
    77 
    88CONFIGFILE="/etc/alternc/local.sh" 
    9 MYSQLCONFIG="/etc/alternc/mysql.cnf" 
    109 
    1110update_var() { 
     
    7877DEFAULT_MX="" 
    7978 
    80 # Starting with 0.9.5, the MySQL configuration for the support scripts 
    81 # is stored in /etc/alternc/mysql.cnf 
     79# MySQL configuration 
    8280MYSQL_HOST="" 
    8381MYSQL_DATABASE="" 
     
    124122    sed -e "$SED_SCRIPT" < $CONFIGFILE > $CONFIGFILE.tmp 
    125123    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 
    145124 
    146125    # forget the password 
  • trunk/install/upgrades/0.9.5.sh

    r999 r1001  
    77chmod 640 /etc/postfix/my* 
    88rm -f /var/alternc/bureau/admin/adm_list2.php 
    9  
    10 TMP=`mktemp` 
    11 TMP2=`mktemp` 
    12  
    13 if [ ! -e /etc/alternc/mysql.cnf ]; then 
    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  
    16     chgrp www-data "$TMP" 
    17     chmod g+r "$TMP" 
    18     mv "$TMP" /etc/alternc/mysql.cnf 
    19 fi 
    20  
    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.