From e7cc8cb839874036496147199c7a94a695016b85 Mon Sep 17 00:00:00 2001 From: rootzoll Date: Sat, 8 Dec 2018 22:43:27 +0100 Subject: [PATCH] set all exits to OK --- home.admin/_bootstrap.sh | 12 ++++++------ home.admin/assets/bootstrap.service | 1 + 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/home.admin/_bootstrap.sh b/home.admin/_bootstrap.sh index 5c15e68..a0cd32b 100644 --- a/home.admin/_bootstrap.sh +++ b/home.admin/_bootstrap.sh @@ -124,7 +124,7 @@ if [ ${hddIsAutoMounted} -eq 0 ]; then # display will ask user to run setup echo "state=waitsetup" > $infoFile echo "message='HDD needs SetUp (1)'" >> $infoFile - exit 1 + exit 0 fi # temp-mount the HDD @@ -137,7 +137,7 @@ if [ ${hddIsAutoMounted} -eq 0 ]; then echo "state=waitsetup" > $infoFile echo "message='HDD failed Mounting'" >> $infoFile # no need to unmount the HDD, it failed mounting - exit 1 + exit 0 else echo "OK - HDD available under /mnt/hdd" >> $logFile fi @@ -159,7 +159,7 @@ if [ ${hddIsAutoMounted} -eq 0 ]; then # save log file for inspection before reboot cp $logFile /home/admin/raspiblitz.recover sudo shutdown -r now - exit 1 + exit 0 else echo "OK - No config file found: ${configFile}" >> $logFile fi @@ -172,7 +172,7 @@ if [ ${hddIsAutoMounted} -eq 0 ]; then echo "state=olddata" > $infoFile echo "message='No Auto-Update possible'" >> $infoFile # keep HDD mounted if user wants to copy data - exit 1 + exit 0 else echo "OK - No LND data found" >> $logFile fi @@ -203,7 +203,7 @@ if [ ${hddIsAutoMounted} -eq 0 ]; then echo "done" >> $logFile # after admin login, presync will be stoped and HDD unmounted - exit 1 + exit 0 else echo "OK - No bitcoin blockchain data found" >> $logFile @@ -215,7 +215,7 @@ if [ ${hddIsAutoMounted} -eq 0 ]; then echo "message='HDD needs SetUp (2)'" >> $infoFile # unmount HDD to be ready for auto-mount during setup sudo umount -l /mnt/hdd - exit 1 + exit 0 fi diff --git a/home.admin/assets/bootstrap.service b/home.admin/assets/bootstrap.service index 4c6e1aa..bb998f2 100644 --- a/home.admin/assets/bootstrap.service +++ b/home.admin/assets/bootstrap.service @@ -12,6 +12,7 @@ Type=oneshot ExecStart=/home/admin/_bootstrap.sh KillMode=process StandardOutput=journal +Restart=no [Install] WantedBy=multi-user.target \ No newline at end of file