#!/bin/sh
if [ -f /app-data/config/log-to-hdd ]; then
    echo "Disable logging"
	rm /app-data/config/log-to-hdd
fi

echo "Stopping miner..."
/app/bin/app-utils -action stop
/bin/sleep 2
echo "Syncing..."
/bin/sync
/bin/sleep 5
echo "Rebooting..."
/app/bin/app-utils -action reboot
/bin/sleep 7
/sbin/reboot