commti after qwen start

This commit is contained in:
mariano
2026-05-22 13:55:01 +02:00
parent ba2293102d
commit ad42773519
15 changed files with 2503 additions and 0 deletions
@@ -0,0 +1,9 @@
# Ricarica configurazione supervisor
sudo supervisorctl reread
sudo supervisorctl update
# Esegui manualmente la task
sudo supervisorctl start glpi-netconfig
# Monitora log in tempo reale
sudo tail -f /var/log/glpi_netconfig_supervisor.log
@@ -0,0 +1,11 @@
# /etc/supervisor/conf.d/glpi-netconfig.conf
[program:glpi-netconfig]
command=/usr/bin/python3 /usr/share/glpi_agent/plugins/netconfig_backup.py
directory=/usr/share/glpi_agent/plugins
user=glpi-agent
autostart=false # Non partire all'avvio, esegui solo on-demand
autorestart=false
startsecs=0
stdout_logfile=/var/log/glpi_netconfig_supervisor.log
stderr_logfile=/var/log/glpi_netconfig_supervisor_err.log
environment=NETCONFIG_CONFIG="/etc/glpi-agent/netconfig_devices.yaml",GLPI_URL="https://glpi.example.com",NETCONFIG_AGENT_TOKEN="your_secure_token"
@@ -0,0 +1,48 @@
# /etc/systemd/system/glpi-netconfig.service
[Unit]
Description=GLPI NetConfig Backup Task
After=network.target
[Service]
Type=oneshot
User=glpi-agent
ExecStart=/usr/bin/python3 /usr/share/glpi_agent/plugins/netconfig_backup.py
Environment="NETCONFIG_CONFIG=/etc/glpi-agent/netconfig_devices.yaml"
Environment="GLPI_URL=https://glpi.example.com"
Environment="NETCONFIG_AGENT_TOKEN=your_secure_token"
StandardOutput=journal
StandardError=journal
- altro ini (bho)
# /etc/systemd/system/glpi-netconfig.timer
[Unit]
Description=Run GLPI NetConfig Backup every 6 hours
Requires=glpi-netconfig.service
[Timer]
OnCalendar=*-*-* 02/6:00:00
Persistent=true
RandomizedDelaySec=300
[Install]
WantedBy=timers.target
---
# attivazioen disattivazioen timer
# Attiva e avvia il timer
sudo systemctl daemon-reload
sudo systemctl enable --now glpi-netconfig.timer
# Verifica stato
systemctl list-timers | grep netconfig
journalctl -u glpi-netconfig.service -f
@@ -0,0 +1,3 @@
# /etc/cron.d/glpi-netconfig
# Esegui backup ogni 6 ore alle 02:00, 08:00, 14:00, 20:00
0 2,8,14,20 * * * glpi-agent /usr/bin/python3 /usr/share/glpi_agent/plugins/netconfig_backup.py >> /var/log/glpi_netconfig_cron.log 2>&1