Hellos,
IN below video , I showcase AETL +
Always UP
, this tool ensures that
1. every time AETL is switched off , it's switched back on
2. All relevant services are restarted as well
3. Personally I have found some of my python services don't run well with AETL agent and always crash , but run fine that they are running using AETL.
4. Obviously it's not sponsored ! I have been using this from around 6 months.
www.loom.com/share/3fcac4e9d1554ae492108...41-b64f-84a4bd08630a
Below is the script which we used to ensure all services are also stopped when AETL stops.
@echo off
:: Function to stop a service if it's running
call :stop_service aetlagent64
call :stop_service aetldirectorymonitor64
:: Wait briefly to ensure services have time to stop
timeout /t 2 /nobreak >nul
:: Display a message and exit without requiring user input
echo Services and processes have been stopped.
exit /b
:: Function to stop a service
:stop_service
sc query %1 | find "RUNNING" >nul
if %errorlevel% equ 0 (
sc stop %1 >nul 2>&1
if %errorlevel% neq 0 (
echo Failed to stop service %1.
)
) else (
echo Service %1 is not running.
)
exit /b