????

Your IP : 3.22.234.133


Current Path : /usr/local/lib/python3.9/site-packages/agent360/plugins/__pycache__/
Upload File :
Current File : //usr/local/lib/python3.9/site-packages/agent360/plugins/__pycache__/apt-updates.cpython-39.pyc

a

��g��@s8ddlZddlZGdd�dej�Zedkr4e���dS)�Nc@seZdZdZdd�ZdS)�Plugin�apt-updatescCs�i}tt�d����|d<tt�d����|d<z>|�dd�}tj�d�r\|dkr\d	|d
<n|dkrld|d
<Wnty�Yn0|S)a�
        ubuntu/debian updates available from apt-get
        add to /etc/sudoers the following line:
        agent360 ALL=(ALL) NOPASSWD: /usr/bin/apt-get

        test by running:
        sudo -u agent360 agent360 test apt-updates

        Add to /etc/agent360.ini:
        [apt-updates]
        enabled = yes
        interval = 3600

        Optionally check if a reboot is required:
        checkreboot = true
        z>sudo -n apt-get upgrade -s | grep Inst | grep security | wc -l�securityzAsudo -n apt-get upgrade -s | grep Inst | grep -v security | wc -l�otherr�checkrebootz/var/run/reboot-required�trueZYeszReboot RequiredZNo)�int�os�popen�read�get�path�exists�	Exception)�self�config�datar�r�F/usr/local/lib/python3.9/site-packages/agent360/plugins/apt-updates.py�run	s
z
Plugin.runN)�__name__�
__module__�__qualname__rrrrrrsr�__main__)r	ZpluginsZ
BasePluginrr�executerrrr�<module>s!