Changeset 6926 for lliurex-analytics-server
- Timestamp:
- Feb 26, 2018, 6:25:43 PM (3 years ago)
- Location:
- lliurex-analytics-server/trunk/fuentes
- Files:
-
- 1 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
lliurex-analytics-server/trunk/fuentes/debian/changelog
r6885 r6926 1 lliurex-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 1 7 lliurex-analytics-server (0.2.4) xenial; urgency=medium 2 8 -
lliurex-analytics-server/trunk/fuentes/debian/postinst
r6821 r6926 19 19 # for details, see http://www.debian.org/doc/debian-policy/ or 20 20 # the debian-policy package 21 do_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 } 21 34 do_dialog(){ 22 35 input=$(dialog \ … … 163 176 164 177 # UPDATE DB FROM OLDER VERSIONS 178 do_backup "$rootuser" "$rootpass" 179 165 180 is_version_1=0 166 181 is_version_1_4=0 -
lliurex-analytics-server/trunk/fuentes/lliurex-analytics-server/usr/sbin/analyticsd
r6857 r6926 955 955 956 956 if __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: 959 968 printea("Another daemon running... exitting now!") 960 969 sys.exit(1)
Note: See TracChangeset
for help on using the changeset viewer.