Changeset 3605
- Timestamp:
- Feb 13, 2017, 4:53:13 PM (4 years ago)
- Location:
- lliurex-analytics-server/trunk/fuentes/debian
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
lliurex-analytics-server/trunk/fuentes/debian/changelog
r3551 r3605 1 lliurex-analytics-server (0.1.3) xenial; urgency=medium 2 3 * Fix debian scripts 4 5 -- M.Angel Juan <m.angel.juan@gmail.com> Mon, 13 Feb 2017 16:23:13 +0100 6 1 7 lliurex-analytics-server (0.1.2) xenial; urgency=medium 2 8 -
lliurex-analytics-server/trunk/fuentes/debian/postinst
r3377 r3605 1 #!/bin/ bash1 #!/bin/sh 2 2 # postinst script 3 3 # 4 4 # see: dh_installdeb(1) 5 5 6 #set -e7 8 . /usr/share/debconf/confmodule6 set -e 7 # AVOID DECOMENT WITHOUT DEBCONF QUESTIONS 8 #. /usr/share/debconf/confmodule 9 9 10 10 # summary of how this script can be called: … … 52 52 PASS=$(cat /etc/lliurex-analytics-server/config_db|perl -ne '/pass=(.*)/i && print $1') 53 53 if [ -n "${USER}" -a -n "${PASS}" ]; then 54 RES=$(echo 'show tables;'|mysql -u${USER} -p${PASS} -s analytics 2>/dev/null )54 RES=$(echo 'show tables;'|mysql -u${USER} -p${PASS} -s analytics 2>/dev/null || true) 55 55 if [ -n "${RES}" ]; then 56 56 user="${USER}" … … 77 77 if [ "${ASK}" = "yes" ]; then 78 78 ask_question 'Desea configurar la base de datos analytics?' 79 if [ "x$input" = ="xyes" ]; then79 if [ "x$input" = "xyes" ]; then 80 80 create_db=$input 81 81 ask_question 'Desea crear usuario para la tabla de la base de datos?' 82 82 create_user=$input 83 if [ "x$input" = ="xyes" ]; then83 if [ "x$input" = "xyes" ]; then 84 84 do_dialog 'Database configuration' 'Nombre del usuario para crear:' 85 85 user=$input … … 106 106 #INITIALIZE DB 107 107 108 if [ "x$create_db" = ="xyes" ]; then109 if [ "x$rootpass" = ="x" ]; then108 if [ "x$create_db" = "xyes" ]; then 109 if [ "x$rootpass" = "x" ]; then 110 110 mysqlroot="mysql -uroot" 111 111 mysqluser="mysql -u$user -p$pass" … … 114 114 mysqluser="mysql -u$user -p$pass" 115 115 fi 116 if [ "x$create_user" = ="xyes" ]; then116 if [ "x$create_user" = "xyes" ]; then 117 117 echo "create user '$user'@'%' identified by '$pass';" | $mysqlroot 118 118 echo "grant all privileges on analytics.* to '$user'@'%';" | $mysqlroot … … 157 157 # CONFIG APACHE 158 158 159 a2enmod rewrite 160 a2ensite analytics 161 service apache2 restart 159 if [ -e /usr/share/apache2/apache2-maintscript-helper ] ; then 160 . /usr/share/apache2/apache2-maintscript-helper 161 apache2_invoke enmod rewrite || exit $? 162 apache2_invoke ensite analytics || exit $? 163 fi 162 164 163 165 if [ "${print_info}" = "yes" ]; then -
lliurex-analytics-server/trunk/fuentes/debian/prerm
r3366 r3605 1 #!/bin/ bash1 #!/bin/sh 2 2 # prerm script 3 3 # 4 4 # see: dh_installdeb(1) 5 5 6 #set -e6 set -e 7 7 8 8 # summary of how this script can be called: … … 20 20 case "$1" in 21 21 remove|upgrade|deconfigure) 22 a2dissite analytics 22 if [ -e /usr/share/apache2/apache2-maintscript-helper ] ; then 23 . /usr/share/apache2/apache2-maintscript-helper 24 apache2_invoke dissite analytics || exit $? 25 fi 23 26 ;; 24 27
Note: See TracChangeset
for help on using the changeset viewer.