HEX
Server: LiteSpeed
System: Linux spg20.cloudpowerdns.com 5.14.0-611.35.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Feb 25 03:46:09 EST 2026 x86_64
User: carrerup (3153)
PHP: 8.2.30
Disabled: NONE
Upload Files
File: //usr/local/lib/python3.9/site-packages/agent360/plugins/__pycache__/apt-updates.cpython-39.pyc
a

w �i��@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!