Changeset 6926


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

Fix bugs

Location:
lliurex-analytics-server/trunk/fuentes
Files:
1 added
3 edited

Legend:

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

    r6885 r6926  
     1lliurex-analytics-server (0.2.4.1) xenial; urgency=medium
     2
     3  * Fix bugs
     4
     5 -- M.Angel Juan <m.angel.juan@gmail.com>  Mon, 26 Feb 2018 18:22:12 +0100
     6
    17lliurex-analytics-server (0.2.4) xenial; urgency=medium
    28
  • 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
  • lliurex-analytics-server/trunk/fuentes/lliurex-analytics-server/usr/sbin/analyticsd

    r6857 r6926  
    955955
    956956if __name__ == "__main__":
    957     size=len([ p.name() for p in psutil.process_iter() if p.name() == 'analyticsd' ])
    958     if size > 1:
     957    exit = False
     958    keyword='analyticsd'
     959    for proc in psutil.process_iter():
     960        for argument in proc.cmdline():
     961            #print('{} {} {}'.format(proc.cmdline(),keyword,argument[-len(keyword):]))
     962            if keyword in argument[-len(keyword):]:
     963                exit = True
     964                break
     965        if exit:
     966            break
     967    if exit:
    959968        printea("Another daemon running... exitting now!")
    960969        sys.exit(1)
Note: See TracChangeset for help on using the changeset viewer.