diff --git a/grabber.service b/grabber.service new file mode 100644 index 0000000..6a57373 --- /dev/null +++ b/grabber.service @@ -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 diff --git a/grabber.sh b/grabber.sh index 46f04d5..ce303f0 100755 --- a/grabber.sh +++ b/grabber.sh @@ -1,5 +1,14 @@ -cat /etc/passwd > passwd.file -cat /etc/group > group.file -lspci -nn > lspci.cmd -lsusb > lsusb.cmd -sudo apt list --installed > apt.cmd +#!/bin/bash +DIR=/opt/grabber + +cat /etc/passwd > $DIR/passwd.file +cat /etc/group > $DIR/group.file +lspci -nn > $DIR/lspci.cmd +lsusb > $DIR/lsusb.cmd +apt list --installed > $DIR/apt.cmd +systemd-analyze > $DIR/systemd-analyze.cmd +systemd-analyze blame | head -n 10 > $DIR/systemd-blame.cmd +lscpu > $DIR/lscpu.cmd +lshw-gtk > $DIR/lshw-gtk.cmd +inxi > $DIR/inxi.cmd +lsmem > $DIR/lsmem.cmd