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/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.