Sindbad~EG File Manager

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

3

�uGh��@s8ddlZddlZGdd�dej�Zedkr4e�j�dS)�Nc@seZdZdZdd�ZdS)�Pluginzapt-updatescCs�i}ttjd�j��|d<ttjd�j��|d<y>|jdd�}tjjd�r\|dkr\d	|d
<n|dkrld|d
<Wntk
r�YnX|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�otherzapt-updates�checkrebootz/var/run/reboot-required�trueZYeszReboot RequiredZNo)�int�os�popen�read�get�path�exists�	Exception)�self�config�datar�r�E/root/tmp/pip-build-gzoz1_uw/agent360/agent360/plugins/apt-updates.py�run	s
z
Plugin.runN)�__name__�
__module__�__qualname__rrrrrrsr�__main__)rZpluginsZ
BasePluginrr�executerrrr�<module>s!

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists