#!/bin/bash # Delay Syncthing until other boot stuff has completed. if [[ "$1" != "start" ]] && exit 0; then if mv /etc/init.d/S27syncthing /etc/init.d/S99syncthing; then echo "Successfully delayed Syncthing." elif ls /etc/init.d/S99syncthing; then echo "Command has already run!" exit 0 else echo "Syncthing failed to be delayed." touch /userdata/check-boot-custom-sh shutdown -h now exit 1 fi fi exit $?