Changeset 3369 for lliurex-analytics-server/trunk/fuentes/debian/postinst
- Timestamp:
- Jan 19, 2017, 1:41:02 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
lliurex-analytics-server/trunk/fuentes/debian/postinst
r3367 r3369 121 121 echo "user=$user" >> /etc/lliurex-analytics-server/config_db 122 122 echo "pass=$pass" >> /etc/lliurex-analytics-server/config_db 123 chmod 750 /etc/lliurex-analytics-server/config_db 123 124 fi 124 125 $mysqluser < /usr/lib/analytics-server/analytics.sql … … 131 132 echo "user=$user" >> /etc/lliurex-analytics-server/config_db 132 133 echo "pass=$pass" >> /etc/lliurex-analytics-server/config_db 133 134 chmod 640 /etc/lliurex-analytics-server/config_db 134 135 fi 135 136 fi … … 137 138 RES1=$(grep -o '@phpuser@' /usr/lib/analytics-server/analytics/config.php) 138 139 RES2=$(grep -o '@phppass@' /usr/lib/analytics-server/analytics/config.php) 139 140 if [ - n "${RES1}" -a -n "${RES2}" ]; then140 141 if [ -f "/usr/lib/analytics-server/analytics/config.php" -a -n "${RES1}" -a -n "${RES2}" ]; then 141 142 sed -i.old -e "s/@phpuser@/$user/g" -e "s/@phppass@/$pass/g" /usr/lib/analytics-server/analytics/config.php 142 143 rm /usr/lib/analytics-server/analytics/config.php.old 144 chmod 640 /usr/lib/analytics-server/analytics/config.php 145 apachectl_cmd=$(which apachectl) 146 apache_group=$(${apachectl_cmd} -t -D DUMP_RUN_CFG 2>/dev/null|perl -ne '/group:[ ]+name=\"(.*)\"/i && print $1') 147 if [ -z "${apache_group}" ]; then 148 echo "Warning: apache group not detected, falling back to www-data" 149 apache_group="www-data" 150 fi 151 chgrp ${apache_group} /usr/lib/analytics-server/analytics/config.php 143 152 else 144 153 echo "BUG !! WARNING: replace tags @phpuser@ & @phppass@ not found in /usr/lib/analytics-server/analytics/config.php"
Note: See TracChangeset
for help on using the changeset viewer.