I was wondering if anyone already wrote a script for testing a linux service.
My goal is the following:
- Run a Sure Backup Job for a specific Linux VM
- Have a custom script which checks the status of a specific service (systemctl status specific_service)
- If the specific service is running, the Sure Backup should be successfull
- If the specific service is not running, the Sure Backup should be failed
From my understanding so far, i need to create a custom script for this Job which connects to the VM and checks the service.
Sure_Backup_Linux.bat (added in the job)
Code: Select all
"C:\temp\putty.exe -ssh root@IP.V4.Address -m C:\Sure_Backup_Scripts\Script\sure_linux_test.sh
Code: Select all
#!/bin/bash
systemctl status service
And of course, how can i "tell Veeam" if the output of the "status" is running that the SureBackup Job is successful. Also the other way with a failed one.
Thank you very much !
Best Regards
Falko