Ignore:
Timestamp:
Feb 26, 2018, 6:25:43 PM (2 years ago)
Author:
mabarracus
Message:

Fix bugs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lliurex-analytics-server/trunk/fuentes/debian/postinst

    r6821 r6926  
    1919# for details, see http://www.debian.org/doc/debian-policy/ or
    2020# the debian-policy package
     21do_backup(){
     22    USER=$1
     23    PASS=$2
     24    echo 'Doing backup into /etc/lliurex-analytics-server'
     25    appdump="$(which mysqldump)"
     26    if [ -z "$appdump" ]; then
     27        echo "Mysqldump not found"
     28        return 0
     29    fi
     30    date="$(date +%s)"
     31    mkdir -p /etc/lliurex-analytics-server
     32    $($appdump $USER $PASS analytics | gzip -9 > /etc/lliurex-analytics-server/dump.$date ) || true
     33}
    2134do_dialog(){
    2235    input=$(dialog      \
     
    163176
    164177# UPDATE DB FROM OLDER VERSIONS
     178    do_backup "$rootuser" "$rootpass"
     179
    165180    is_version_1=0
    166181    is_version_1_4=0
Note: See TracChangeset for help on using the changeset viewer.