yo4hOhdZddlZddlZddlmZejeZGddeZ dZ dS)z"Notify systemd about process stateN)ANTIVIRUS_MODEc"eZdZdZdZdZdZdZdS) AgentStatez*Allowed agent state for notifying systemd.zREADY=1zSTATUS=Starting main processz#STATUS=Applying database migrationszSTATUS=DemonizedN)__name__ __module__ __qualname____doc__READYSTARTING MIGRATING DAEMONIZED\/opt/imunify360/venv/lib/python3.11/site-packages/defence360agent/subsys/systemd_notifier.pyrr s(44 E-H5I#JJJrrctrdS ddl}dtjvrtddS |d}||dS#t$r&}t d|Yd}~dSd}~wwxYw#t$r&}t d|Yd}~dSd}~wwxYw) z Send notification to systemd, allowed formats described here https://www.freedesktop.org/software/systemd/man/sd_notify.html For example: notify("STATUS=Almost ready") Nr NOTIFY_SOCKETz$NOTIFY_SOCKET environment variable is not set. It is set by service manager for supervised processes for status and start-up completion notification. Nowhere to send the status.T)debugz9some problem has occurred during notifying of systemd: %sz!Can't import sdnotify, reason: %s) rsdnotifyosenvironloggerwarningSystemdNotifiernotify Exception exception ImportErrorinfo)staternes rrrs& "* , , NN      ,,4,88     #  <<< 7;;;;;;;;;r&s(( ;;;;;;  8 $ $$$$$$$$$$$$$$r