Files
SIA/scripts/restart.sh
2025-03-18 09:46:16 +01:00

20 lines
353 B
Bash

#!/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