Commit 492188ed authored by Paul Cammish's avatar Paul Cammish
Browse files

Updated to deal with minimal installs.

parent ec9bd435
......@@ -5,7 +5,7 @@ if [ $( id -u $(whoami) ) != 0 ]; then
exit 1
fi
codename=$( lsb_release -c | cut -f 2 )
codename=$( if ! which lsb_release ; then grep ^VERSION= /etc/os-release | cut -d \( -f 2 | cut -d \) -f 1 ; else lsb_release -c | cut -f 2 ; fi )
case "x$1" in
"x") version="$codename";;
......@@ -22,6 +22,12 @@ echo "This script will help you install Sympl on a Debian Linux server with"
echo " minimal hassle, and give you some intial pointers."
echo
if [ $( grep -c '^stretch$\|^buster$' <<< $codename ) == 0 ]; then
echo "ERROR: Sorry, this script doesn't recognise your Debian version."
echo " You may need to install lsb_release, or check your version."
echo " Expected 'stretch' or 'buster' but got '$codename'."
fi
if ! hostname --fqdn > /dev/null 2>&1 ; then
echo "ERROR: Something doesn't seem right with your server hostname."
echo " You should check it has a matching enty in /etc/hosts and is"
......@@ -90,7 +96,7 @@ echo "
1. This system now has a system user named 'sympl', which has inherited the
password of the 'root' user.
You should change this password IMMEDIATELY, and you will be prompted when
you continue.
you continue.
Ensure the password is complex as it has access to the whole system.
Consider using SSH Keys where possible.
......@@ -106,7 +112,7 @@ echo "
If you encounter a bug, you can log it at https://bugs.sympl.host.
4. To get started, check http://wiki.sympl.host/Get_Started
"
read -n1 -p 'Press any key to set the new password...'
......@@ -115,4 +121,4 @@ echo
echo "Setting new password for user 'sympl':"
passwd sympl
echo "Done!"
\ No newline at end of file
echo "Done!"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment