userspace:opsi-audit-cron
Table of Contents
Description
This Script can be used as a cronjob to make all clients do a hwaudit and swaudit on a regular basis. The script does only work with MySQL-Backend (probably also works when using free variant with only inventory in DB!)
Hint: In my variant I am using an event “request_graceful_reboot” which issues a popup requesting the user to reboot. This event has to be defined on every client. You could also remove that singe RPC-Call below.
Usage
./opsi-audit-cron.php [-d] [-t]
- -d Enables Debug-Output for diagnostic
- -t Enables Trace-Output (e.g. returned Data from RPC-Call) - Does not imply Debug!
For Cronjobs you should use some output redirection. For example like that:
./opsi-audit-cron.php » /var/log/opsi/opsi-audit-cron.log
Code
You can find the code here: https://forum.opsi.org/viewtopic.php?f=7&t=8271&p=36087#p36087
userspace/opsi-audit-cron.txt · Last modified: by 127.0.0.1
