refactoring changes from sequpgrade (endReturn, ...) and some modernizations
This commit is contained in:
@@ -12,7 +12,7 @@ sq_aptOpt=
|
||||
seq_config() {
|
||||
## Apt cmdline option to suppress user interaction
|
||||
interactive || sq_aptOpt="-y"
|
||||
|
||||
|
||||
## Return of non zero value will abort the sequence
|
||||
return 0
|
||||
}
|
||||
@@ -55,7 +55,7 @@ step_10() {
|
||||
exe apt update
|
||||
}
|
||||
|
||||
step_11_info() {
|
||||
step_11_info() {
|
||||
echo "Installation of ${toolName} packages:"
|
||||
echoinfo "${sq_toolDeps}"
|
||||
}
|
||||
@@ -63,7 +63,7 @@ step_11_alias() { echo "install"; }
|
||||
step_11() {
|
||||
exe apt update
|
||||
exe apt install ${sq_toolDeps} ${sq_aptOpt:-}
|
||||
endReturn -o $? "Failed to install ${toolName}"
|
||||
endReturn "Failed to install ${toolName}"
|
||||
}
|
||||
|
||||
step_12_info() {
|
||||
@@ -90,7 +90,7 @@ step_12() {
|
||||
info "Removing user nginx"
|
||||
exe deluser ${lQuiet} nginx || true # allowed to fail if non existent
|
||||
|
||||
if [[ ! -e "/var/www" ]] ; then
|
||||
if [[ ! -e "/var/www" ]] ; then
|
||||
info "Create default web server directory."
|
||||
exe mkdir "/var/www"
|
||||
exe chown www-data: "/var/www"
|
||||
@@ -114,7 +114,7 @@ step_13() {
|
||||
exe apt install ${sq_toolDeps} ${sq_aptOpt:-}
|
||||
fi
|
||||
|
||||
# create webroot
|
||||
# create webroot
|
||||
exe mkdir -p "$siteLetsencryptWww"
|
||||
|
||||
info -n "Restarting Nginx..."
|
||||
@@ -136,7 +136,7 @@ siteDefaultLoc="/etc/nginx/conf.d/default"
|
||||
siteDefaultIp4="server {
|
||||
listen 80 default_server;
|
||||
|
||||
include ${snippetLetsencryptLoc};
|
||||
include ${snippetLetsencryptLoc};
|
||||
}"
|
||||
|
||||
step_20_info() { echo "Installation notes"; }
|
||||
|
Reference in New Issue
Block a user