Files
SIA/scripts/restart.sh
2025-03-24 10:53:51 +00:00

20 lines
353 B
Bash
Executable File

#!/bin/bash
set -e
cd "/root/desktop"
while true; do
"/root/sia/scripts/install.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