- Timestamp:
- Nov 30, 2016, 6:20:04 PM (4 years ago)
- Location:
- lliurex-statistics/trunk/fuentes/lliurex-statistics.install
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
lliurex-statistics/trunk/fuentes/lliurex-statistics.install/etc/init.d/analytics
r2962 r2966 21 21 SCRIPTNAME=/etc/init.d/"$NAME" 22 22 STATUS_FILE=/etc/lliurex-analytics/status 23 LOCK_FILE=/var/run/analytics.lock 23 24 24 25 # Exit if the package is not installed … … 39 40 fi 40 41 } 42 remove_locks() 43 { 44 if [ -f "${LOCK_FILE}" ]; then 45 log_success_msg "Removing lockfile ${LOCK_FILE}" 46 rm -f ${LOCK_FILE} 47 fi 48 } 41 49 # 42 50 # Function that starts the daemon/service … … 49 57 # 2 if daemon could not be started 50 58 set_acls 59 remove_locks 51 60 start-stop-daemon --start --quiet --pidfile "$PIDFILE" --exec "$DAEMON" -- \ 52 61 $EXTRAOPTIONS \ -
lliurex-statistics/trunk/fuentes/lliurex-statistics.install/usr/sbin/analytics
r2963 r2966 90 90 91 91 def check_server_acknowledge(): 92 c = xmlrpclib.ServerProxy("https://server:9779/") 93 return c.get_variable("","VariablesManager","STATS_ENABLED") 92 try: 93 c = xmlrpclib.ServerProxy("https://server:9779/") 94 return c.get_variable("","VariablesManager","STATS_ENABLED") 95 except: 96 return '0' 94 97 #END def check_server_acknowledge() 95 98 … … 466 469 filename='' #initializes as global when is called get_filename 467 470 next_filename=get_filename(LOGPATH) 468 debug("filename="+filename+' next='+next_filename)469 471 470 472 server = config.get('Server','server'); … … 489 491 INTERPRETERS = config.get('Audit','interpreters').split(',') 490 492 491 493 debug("filename="+filename+' next='+next_filename) 492 494 493 495 if __name__ == '__main__':
Note: See TracChangeset
for help on using the changeset viewer.