Files
SIA/scripts/restart.sh
2025-03-17 10:38:36 +01:00

20 lines
350 B
Bash

#!/bin/bash
set -e
cd "/root/desktop"
while true; do
"/root/sia/scripts/init.sh"
sia
EXIT_CODE=$?
if [ $EXIT_CODE -eq 42 ]; then
echo "SIA exited with code 42. Restarting in 2 seconds..."
sleep 2
else
echo "SIA exited with code $EXIT_CODE. Not restarting."
break
fi
done
exit $EXIT_CODE