mirror of https://github.com/status-im/fathom.git
ask for letsencrypt cert installation
This commit is contained in:
parent
813eb460a3
commit
67bbdf34eb
15
install.sh
15
install.sh
|
@ -12,6 +12,8 @@ if [ "$EUID" -ne 0 ]; then
|
|||
exit
|
||||
fi
|
||||
|
||||
echo "Welcome to the Fathom quick installer. Press CTRL-C at any time to abort."
|
||||
|
||||
function download_fathom() {
|
||||
# Download latest version of the Fathom application
|
||||
echo "Downloading Fathom"
|
||||
|
@ -185,6 +187,11 @@ END
|
|||
echo ""
|
||||
}
|
||||
|
||||
function new_cerbot_cert() {
|
||||
certbot --nginx -d "$SERVER_NAME"
|
||||
echo ""
|
||||
}
|
||||
|
||||
# Download Fathom if command does not exist
|
||||
FATHOM_PATH="$(command -v fathom)"
|
||||
if [ "$FATHOM_PATH" != "" ]; then
|
||||
|
@ -217,6 +224,14 @@ if [ "$(command -v systemctl)" ]; then
|
|||
fi
|
||||
fi;
|
||||
|
||||
# Ask to request new LetsEncrypt certificate
|
||||
if [ "$SERVER_NAME" != "" ] && [ "$(command -v certbot)" ]; then
|
||||
read -p "LetsEncrypt detected. Request SSL certificate for $SERVER_NAME? (Y/n): " CONTINUE
|
||||
if [ "$CONTINUE" != "n" ]; then
|
||||
new_cerbot_cert
|
||||
fi
|
||||
fi;
|
||||
|
||||
# Try to be helpful
|
||||
if [ "$SERVER_NAME" != "" ] && [ "$SERVICE_NAME" != "" ]; then
|
||||
echo "Success! You should now see Fathom running on $SERVER_NAME"
|
||||
|
|
Loading…
Reference in New Issue