Changeset 879
- Timestamp:
- 03/15/06 16:19:15 (7 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
-
debian/config (modified) (2 diffs)
-
debian/postinst (modified) (3 diffs)
-
install/alternc.install (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/debian/config
r858 r879 7 7 db_title AlternC 8 8 9 db_reset alternc/welcomeconfirm || true 10 db_fset alternc/welcomeconfirm "seen" "false" || true 11 db_set alternc/welcomeconfirm "true" || true 9 # We don't reset the welcomeconfirm seen flag. 10 #db_reset alternc/welcomeconfirm || true 11 #db_fset alternc/welcomeconfirm "seen" "false" || true 12 #db_set alternc/welcomeconfirm "true" || true 12 13 db_input critical alternc/welcomeconfirm || true 13 14 … … 24 25 MYSQL_DATABASE=alternc 25 26 MYSQL_USER=sysusr 26 MYSQL_PASS=`perl -e 'print map{("a".."z","A".."Z",0..9)[int(rand(62))]}(1..10)' ` 27 FQDN=`hostname -f` 28 #INTERNAL_IP=`perl -e "print gethostbyname('$FQDN')"` 29 INTERNAL_IP=`/sbin/ifconfig|grep "inet addr:" | grep -v 127.0.0.1| head -1 | sed -e 's/^.*addr:\([0-9\.]*\).*$/\1/'` 30 DEFAULT_MX=`cat /etc/mailname` 31 ALTERNC_LOC='/var/alternc' 32 FQDN=`hostname -f` 27 MYSQL_PASS="`perl -e 'print map{("a".."z","A".."Z",0..9)[int(rand(62))]}(1..10)' `" 28 FQDN="`cat /etc/mailname 2>/dev/null || cat /etc/hostname`" 29 INTERNAL_IP="`/sbin/ifconfig|grep "inet addr:" | grep -v 127.0.0.1| head -1 | sed -e 's/^.*addr:\([0-9\.]*\).*$/\1/' 2>/dev/null || cat /etc/hostname`" 30 PUBLIC_IP="$INTERNAL_IP" 31 DEFAULT_MX="`cat /etc/mailname`" 32 ALTERNC_LOC=/var/alternc 33 33 NS1_HOSTNAME="$FQDN" 34 34 NS2_HOSTNAME="$FQDN" 35 HOSTING="AlternC" 35 36 36 37 if [ -r /etc/alternc/local.sh ]; then -
trunk/debian/postinst
r858 r879 93 93 fi 94 94 95 for pair in \ 96 "alternc/desktopname FQDN" \ 97 "alternc/default_mx DEFAULT_MX" \ 98 "alternc/alternc_location ALTERNC_LOC" \ 99 "alternc/mysql/host MYSQL_HOST" \ 100 "alternc/mysql/db MYSQL_DATABASE" \ 101 "alternc/mysql/user MYSQL_USER" \ 102 "alternc/mysql/password MYSQL_PASS" \ 103 "alternc/public_ip DEFAULT_IP" 104 do 105 skip=0 106 for single in $pair 107 do 108 if [ "$skip" = "0" ]; then 109 db_get "$single" || true 110 skip=1 111 else 112 echo "$single=\"$RET\"" >> /etc/alternc/local.sh 113 fi 114 done 115 done 95 # Update local.sh 96 # 1. use cp to keep permissions 97 # 2. add missing variable to local.sh 98 # 3. use sed to set variables with current values 99 echo "Updating $CONFIGFILE" 100 cp -a -f $CONFIGFILE $CONFIGFILE.tmp 101 # SED_SCRIPT will be modified by update_var 102 SED_SCRIPT="" 103 update_var alternc/hostingname HOSTING 104 update_var alternc/desktopname FQDN 105 update_var alternc/public_ip PUBLIC_IP 106 update_var alternc/internal_ip INTERNAL_IP 107 update_var alternc/monitor_ip MONITOR_IP 108 update_var alternc/ns1 NS1_HOSTNAME 109 update_var alternc/ns2 NS2_HOSTNAME 110 update_var alternc/bind_internal BIND_INTERNAL 111 update_var alternc/default_mx DEFAULT_MX 112 update_var alternc/mysql/host MYSQL_HOST 113 update_var alternc/mysql/db MYSQL_DATABASE 114 update_var alternc/mysql/user MYSQL_USER 115 update_var alternc/mysql/password MYSQL_PASS 116 update_var alternc/alternc_location ALTERNC_LOC 117 update_var alternc/mynetwork SMTP_RELAY_NETWORKS 118 sed -e "$SED_SCRIPT" < $CONFIGFILE > $CONFIGFILE.tmp 119 mv -f $CONFIGFILE.tmp $CONFIGFILE 116 120 117 121 # forget the password … … 134 138 /usr/share/alternc/install/upgrade_check.sh $2 135 139 136 # important: postinst gele sans ca137 db_stop138 139 # ensure our run dir for saslauthd is present in Debian stat database140 # (needed by /etc/init.d/saslauthd)141 PWDIR=/var/spool/postfix/var/run/saslauthd142 dpkg-statoverride --list $PWDIR 2>&1 >/dev/null ||143 dpkg-statoverride --update --add root sasl 710 $PWDIR144 145 # postfix needs to be in the sasl group for saslauthd connection146 adduser --quiet postfix sasl147 148 140 echo "config phpmyadmin" 149 141 include_str='include_once("/etc/alternc/phpmyadmin.inc.php")' … … 153 145 fi 154 146 155 if ! test -e /etc/apache-ssl/conf.d/phpmyadmin.conf; then 156 if test -e /etc/phpmyadmin/apache.conf; then 157 ln -s /etc/phpmyadmin/apache.conf /etc/apache-ssl/conf.d/phpmyadmin.conf 158 fi 159 fi 160 161 if ! test -e /etc/apache/conf.d/phpmyadmin.conf; then 162 if test -e /etc/phpmyadmin/apache.conf; then 163 ln -s /etc/phpmyadmin/apache.conf /etc/apache/conf.d/phpmyadmin.conf 164 fi 165 fi 166 167 168 if ! test -e /etc/apache-ssl/conf.d/squirrelmail.conf; then 169 if test -e /etc/squirrelmail/apache.conf; then 170 ln -s /etc/squirrelmail/apache.conf /etc/apache-ssl/conf.d/squirrelmail.conf 171 fi 172 fi 173 174 if ! test -e /etc/apache/conf.d/squirrelmail.conf; then 175 if test -e /etc/squirrelmail/apache.conf; then 176 ln -s /etc/squirrelmail/apache.conf /etc/apache/conf.d/squirrelmail.conf 177 fi 178 fi 179 180 181 # Apache will not start without this file 182 touch /var/alternc/apacheconf/override_php.conf 183 184 if ! test -e /etc/apache-ssl/conf.d/override_php.conf; then 185 ln -s /var/alternc/apacheconf/override_php.conf /etc/apache-ssl/conf.d/override_php.conf 186 fi 187 188 189 if ! test -e /etc/apache/conf.d/override_php.conf; then 190 ln -s /var/alternc/apacheconf/override_php.conf /etc/apache/conf.d/override_php.conf 191 fi 192 193 147 # important: postinst gele sans ca 148 db_stop 194 149 195 150 echo "running alternc.install" -
trunk/install/alternc.install
r805 r879 146 146 done 147 147 148 tar -zcf "$BACKUP_FILE" -C / $BACKUPS || true148 tar -zcf "$BACKUP_FILE" -C / $BACKUPS 2>/dev/null || true 149 149 150 150 #######################################################################
Note: See TracChangeset
for help on using the changeset viewer.
