update grabber

This commit is contained in:
squick 2025-11-12 11:25:20 +01:00
parent 7f422fe66f
commit 3cc7f42499
2 changed files with 38 additions and 1 deletions

12
grabber.service Normal file
View File

@ -0,0 +1,12 @@
[Unit]
Description=Grabber: report conf
[Service]
Type=oneshot
ExecStart=/opt/grabber.sh
RemainAfterExit=false
StandardOutput=append:/var/log/grabber.log
StandardError=append:/var/log/grabber-error.log
[Install]
WantedBy=default.target

27
grabber.sh Normal file → Executable file
View File

@ -1 +1,26 @@
echo "Bonjour ramzouille"
#!/bin/bash
DIR=/opt/grabber
echo "================" | tee -a /dev/stderr
echo "Début de grabber" | tee -a /dev/stderr
echo "================" | tee -a /dev/stderr
echo "================" | tee -a /dev/stderr
echo "Périphériques USB" | tee -a /dev/stderr
echo "================" | tee -a /dev/stderr
echo "Commande lsusb:" | tee -a /dev/stderr
lsusb 1> $DIR/lsusb.cmd
#cat /etc/passwd > $DIR/passwd.file
#cat /etc/group > $DIR/group.file
#uptime > $DIR/uptime.cmd
#lsblk > $DIR/lsblk.cmd
#lspci -nn > $DIR/lspci.cmd
#systemd-analyze > $DIR/systemd-analyze.cmd
#systemd-analyze blame | head -n 10 > $DIR/systemd-blame.cmd
#lsmem > $DIR/lsmem.cmd
#lscpu > $DIR/lscpu.cmd
#inxi > $DIR/inxi.cmd
#lshw > $DIR/lshw.cmd
#free > $DIR/free.cmd
#arch > $DIR/arch.cmd