Few more fixes
This commit is contained in:
parent
98d97ebf8c
commit
f6513f78e6
|
@ -2,7 +2,7 @@
|
|||
|
||||
#SETTINGS
|
||||
passlen=22
|
||||
emailforle="putyouremailaddresshere@domain.com"
|
||||
emailforle=""
|
||||
|
||||
#FUNCTIONS
|
||||
function errorcheck {
|
||||
|
@ -92,6 +92,13 @@ function gathersettings {
|
|||
echo "IP address is $ipaddress..."
|
||||
echo -n "What is the FQDN for the server? "
|
||||
read fqdn
|
||||
echo -n "Do you want to configure the system hostname the same as the FQDN? (y/n)"
|
||||
read reply
|
||||
if [[ $reply == "y" ]]; then
|
||||
sethost=true
|
||||
else
|
||||
sethost=false
|
||||
fi
|
||||
echo -n "Must an SLL certificate be used? (y/n)"
|
||||
read reply
|
||||
if [[ $reply == "y" ]]; then
|
||||
|
@ -144,6 +151,9 @@ function gathersettings {
|
|||
if [[ $mailfrom == "" ]]; then
|
||||
mailfrom=$mailuser
|
||||
fi
|
||||
if [[ $emailforle == "" ]]; then
|
||||
emailforle=$mailfrom
|
||||
fi
|
||||
echo -n "What is the sender name for the mailserver? "
|
||||
read mailname
|
||||
echo
|
||||
|
@ -218,6 +228,7 @@ function applysettings {
|
|||
|
||||
function sethostname {
|
||||
#SETTING UP HOSTNAME
|
||||
if [[ $sethost == true ]]; then
|
||||
echo "Setting up hostname..."
|
||||
hostnamectl set-hostname ${fqdn%%.*} > /dev/null 2>&1
|
||||
errorcheck $? "define hostname" "EXIT"
|
||||
|
@ -225,6 +236,7 @@ function sethostname {
|
|||
errorcheck $? "define FQDN" "EXIT"
|
||||
echo "1" > "$origpath/setupninja.step"
|
||||
echo
|
||||
fi
|
||||
}
|
||||
|
||||
function initsetup {
|
||||
|
|
Loading…
Reference in New Issue