Skip to content

Commit cd23f5d

Browse files
committed
add reboot step
1 parent 578768e commit cd23f5d

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

.setup/gatewaysetup.sh

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,7 @@ while [ -z ${HTTPPASS} ]; do
171171
done
172172
touch $APPSRVDIR/data/secure/.htpasswd
173173
htpasswd -b $APPSRVDIR/data/secure/.htpasswd $HTTPUSER $HTTPPASS
174+
echo -e "${YLW}Done. You can add/change http_auth credentials using ${RED}htpasswd $APPSRVDIR/data/secure/.htpasswd user newpassword${NC}"
174175

175176
echo -e "${CYAN}************* STEP: Copy gateway site config to sites-available *************${NC}"
176177
cp -rf $APPSRVDIR/.setup/gateway /etc/nginx/sites-available/gateway
@@ -201,7 +202,7 @@ if (whiptail --title "ATXRaspi shutdown script" --yesno "Do you have a MightyHat
201202
fi
202203

203204
echo -e "${CYAN}************* STEP: Enable GPIO serial0, disable serial0 shell & Bluetooth *************${NC}"
204-
sudo raspi-config nonint do_serial 1 #disables console shell over GPIO serial
205+
sudo raspi-config nonint do_serial 1 #disables console shell over GPIO serial
205206
set_config_var enable_uart 1 $CONFIG #enables GPIO serial
206207
set_config_var dtoverlay pi3-disable-bt $CONFIG #disables bluetooth
207208

@@ -233,17 +234,24 @@ if (whiptail --title "Proftpd" --yesno "Do you want to install Proftpd?\nNote: P
233234
fi
234235

235236
sudo apt-get clean
237+
cd ~/
236238

237239
echo -e "${CYAN}************* STEP: Run raspi-config *************${NC}"
238240
if (whiptail --title "Run raspi-config ?" --yesno "Would you like to run raspi-config?\nNote: you should run this tool and configure the essential settings of your Pi if you haven't done it yet!" 12 78) then
239241
sudo raspi-config
240242
fi
241243

242244
echo -e "${RED}Make sure: ${YLW}to edit your gateway settings from the UI or from settings.json5 (and restart to apply changes)${NC}"
243-
echo -e "${RED}By default ${YLW}the gateway app uses the GPIO serial port (/dev/ttyserial0)"
245+
echo -e "${RED}By default ${YLW}the gateway app uses the GPIO serial port (/dev/ttyAMA0)"
244246
echo -e "${YLW}If you use MoteinoUSB or another serial port you must edit the serial port setting or the app will not receive messages from your Moteino nodes.${NC}"
245247
echo -e "${RED}App restarts ${YLW}can be requested from the Gateway UI (power symbol button on settings page, or from the terminal via ${RED}sudo systemctl restart gateway.service${NC}"
246248
echo -e "${YLW}You can change httpauth password using ${RED}htpasswd $APPSRVDIR/data/secure/.htpasswd user newpassword${NC}"
247-
echo -e "${CYAN}************* ALL DONE! *************${NC}"
248-
cd ~/
249+
250+
if (whiptail --title "REBOOT ?" --yesno "All done, a REBOOT is required for the GPIO serial port to be ready.\n\nWould you like to REBOOT now?" 12 78) then
251+
echo -e "${CYAN}************* ALL DONE - REBOOTING... *****************${NC}"
252+
sudo reboot
253+
else
254+
echo -e "${CYAN}************* ALL DONE - REBOOT REQUIRED! *************${NC}"
255+
fi
256+
249257
exit 0

0 commit comments

Comments
 (0)