HEX
Server: LiteSpeed
System: Linux ws4.angoweb.net 5.14.0-611.13.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Dec 11 04:57:59 EST 2025 x86_64
User: tswangoe (2287)
PHP: 8.1.33
Disabled: show_source, system, shell_exec, passthru, exec, phpinfo, popen, proc_open
Upload Files
File: //usr/local/lib/python3.9/site-packages/agent360/plugins/__pycache__/apt-updates.cpython-39.pyc
a

q�dg��@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!