add little more output if installation fails to service start phase

This commit is contained in:
ronivay
2020-10-08 16:43:14 +03:00
parent 7cba8f421c
commit b3826de6cb

View File

@@ -688,14 +688,18 @@ function InstallXO {
echo -e " ${COLOR_GREEN}WebUI started in port $PORT. Make sure you have firewall rules in place to allow access.${COLOR_N}" echo -e " ${COLOR_GREEN}WebUI started in port $PORT. Make sure you have firewall rules in place to allow access.${COLOR_N}"
echo -e " ${COLOR_GREEN}Default username: admin@admin.net password: admin${COLOR_N}" echo -e " ${COLOR_GREEN}Default username: admin@admin.net password: admin${COLOR_N}"
echo echo
printinfo "Installation successful. Enabling xo-server to start on reboot" printinfo "Installation successful. Enabling xo-server service to start on reboot"
cmdlog "/bin/systemctl enable xo-server" cmdlog "/bin/systemctl enable xo-server"
echo echo
/bin/systemctl enable xo-server >>$LOGFILE 2>&1 /bin/systemctl enable xo-server >>$LOGFILE 2>&1
else else
echo echo
printfail "Looks like there was a problem when starting xo-server/reading journalctl. Please see logs for more details" printfail "Installation completed, but looks like there was a problem when starting xo-server/reading journalctl. Please see logs for more details"
journalctl -u xo-server -n 50 >> $LOGFILE echo "xo-server service log:" >> $LOGFILE
echo "" >> $LOGFILE
journalctl -u xo-server -n 100 >> $LOGFILE
echo
echo "Control xo-server service with systemctl for stop/start/restart etc."
exit 1 exit 1
fi fi