Files
SIA/scripts/restart.sh

18 lines
299 B
Bash
Executable File

#!/bin/bash
set -e
while true; do
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