Fix wo-kernel service not installed
This commit is contained in:
32
install
32
install
@@ -663,22 +663,24 @@ wo_tweak_kernel() {
|
|||||||
fi
|
fi
|
||||||
# apply sysctl tweaks
|
# apply sysctl tweaks
|
||||||
sysctl -eq -p /etc/sysctl.d/60-wo-tweaks.conf
|
sysctl -eq -p /etc/sysctl.d/60-wo-tweaks.conf
|
||||||
if [ ! -x /opt/wo-kernel.sh ]; then
|
else
|
||||||
{
|
sysctl -eq -p /etc/sysctl.d/60-wo-tweaks.conf
|
||||||
# download and setup wo-kernel systemd service to apply kernel tweaks for netdata and redis on server startup
|
fi
|
||||||
wget -qO /opt/wo-kernel.sh https://raw.githubusercontent.com/WordOps/WordOps/updating-configuration/wo/cli/templates/wo-kernel-script.mustache
|
if [ ! -x /opt/wo-kernel.sh ]; then
|
||||||
chmod +x /opt/wo-kernel.sh
|
{
|
||||||
wget -qO /lib/systemd/system/wo-kernel.service https://raw.githubusercontent.com/WordOps/WordOps/updating-configuration/wo/cli/templates/wo-kernel-service.mustache
|
# download and setup wo-kernel systemd service to apply kernel tweaks for netdata and redis on server startup
|
||||||
systemctl enable wo-kernel.service
|
wget -qO /opt/wo-kernel.sh https://raw.githubusercontent.com/WordOps/WordOps/updating-configuration/wo/cli/templates/wo-kernel-script.mustache
|
||||||
systemctl start wo-kernel.service
|
chmod +x /opt/wo-kernel.sh
|
||||||
} >> /var/log/wo/install.log 2>&1
|
wget -qO /lib/systemd/system/wo-kernel.service https://raw.githubusercontent.com/WordOps/WordOps/updating-configuration/wo/cli/templates/wo-kernel-service.mustache
|
||||||
fi
|
systemctl enable wo-kernel.service
|
||||||
|
systemctl start wo-kernel.service
|
||||||
|
} >> /var/log/wo/install.log 2>&1
|
||||||
|
fi
|
||||||
|
|
||||||
fi
|
fi
|
||||||
LIMIT_CHECK=$(grep "500000" /etc/security/limits.conf)
|
LIMIT_CHECK=$(grep "500000" /etc/security/limits.conf)
|
||||||
if [ -z "$LIMIT_CHECK" ]; then
|
if [ -z "$LIMIT_CHECK" ]; then
|
||||||
echo -e "* hard nofile 500000\n* soft nofile 500000\nroot hard nofile 500000\nroot soft nofile 500000\n" >> /etc/security/limits.conf
|
echo -e "* hard nofile 500000\n* soft nofile 500000\nroot hard nofile 500000\nroot soft nofile 500000\n" >> /etc/security/limits.conf
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1384,13 +1384,16 @@ def setupLetsEncrypt(self, wo_domain_name, subdomain=False, wildcard=False,
|
|||||||
'keylength'))
|
'keylength'))
|
||||||
if wo_dns:
|
if wo_dns:
|
||||||
acme_mode = "--dns {0}".format(wo_acme_dns)
|
acme_mode = "--dns {0}".format(wo_acme_dns)
|
||||||
|
validation_mode = "DNS with {0}".format(wo_acme_dns)
|
||||||
Log.debug(
|
Log.debug(
|
||||||
self, "Validation : DNS mode with {0}".format(wo_acme_dns))
|
self, "Validation : DNS mode with {0}".format(wo_acme_dns))
|
||||||
else:
|
else:
|
||||||
acme_mode = "-w /var/www/html"
|
acme_mode = "-w /var/www/html"
|
||||||
|
validation_mode = "Webroot challenge"
|
||||||
Log.debug(self, "Validation : Webroot mode")
|
Log.debug(self, "Validation : Webroot mode")
|
||||||
if subdomain:
|
if subdomain:
|
||||||
Log.info(self, "Issuing subdomain SSL cert with acme.sh")
|
Log.info(self, "Issuing subdomain SSL cert with acme.sh")
|
||||||
|
Log.info(self, "Validation mode : {0}".format(validation_mode))
|
||||||
ssl = WOShellExec.cmd_exec(self, "/etc/letsencrypt/acme.sh "
|
ssl = WOShellExec.cmd_exec(self, "/etc/letsencrypt/acme.sh "
|
||||||
"--config-home "
|
"--config-home "
|
||||||
"'/etc/letsencrypt/config' "
|
"'/etc/letsencrypt/config' "
|
||||||
@@ -1402,6 +1405,7 @@ def setupLetsEncrypt(self, wo_domain_name, subdomain=False, wildcard=False,
|
|||||||
keylenght))
|
keylenght))
|
||||||
elif wildcard:
|
elif wildcard:
|
||||||
Log.info(self, "Issuing Wildcard SSL cert with acme.sh")
|
Log.info(self, "Issuing Wildcard SSL cert with acme.sh")
|
||||||
|
Log.info(self, "Validation mode : {0}".format(validation_mode))
|
||||||
ssl = WOShellExec.cmd_exec(self, "/etc/letsencrypt/acme.sh "
|
ssl = WOShellExec.cmd_exec(self, "/etc/letsencrypt/acme.sh "
|
||||||
"--config-home "
|
"--config-home "
|
||||||
"'/etc/letsencrypt/config' "
|
"'/etc/letsencrypt/config' "
|
||||||
@@ -1413,6 +1417,7 @@ def setupLetsEncrypt(self, wo_domain_name, subdomain=False, wildcard=False,
|
|||||||
keylenght))
|
keylenght))
|
||||||
else:
|
else:
|
||||||
Log.info(self, "Issuing domain SSL cert with acme.sh")
|
Log.info(self, "Issuing domain SSL cert with acme.sh")
|
||||||
|
Log.info(self, "Validation mode : {0}".format(validation_mode))
|
||||||
ssl = WOShellExec.cmd_exec(self, "/etc/letsencrypt/acme.sh "
|
ssl = WOShellExec.cmd_exec(self, "/etc/letsencrypt/acme.sh "
|
||||||
"--config-home "
|
"--config-home "
|
||||||
"'/etc/letsencrypt/config' "
|
"'/etc/letsencrypt/config' "
|
||||||
|
|||||||
Reference in New Issue
Block a user