Update nodemgmt-scripts.sh
This commit is contained in:
@@ -16,10 +16,10 @@ MAIN_MENU() {
|
||||
do
|
||||
clear
|
||||
echo ""
|
||||
echo -e "${idsCL[LightGreen]} NodeMgmt - G a l e r a / N G I N X N o d e M a n a g e m e n t${idsCL[Default]} ${idsCL[DarkGray]}(ver-${VERS})${idsCL[Default]}"
|
||||
echo -e "${idsCL[LightGreen]}---------------------------------------------------------------------------${idsCL[Default]}"
|
||||
echo -e "${idsCL[LightGreen]} NodeMgmt - G a l e r a / N G I N X N o d e M a n a g e m e n t${idsCL[Default]} ${idsCL[DarkGray]}(ver-${VERS})${idsCL[Default]}"
|
||||
echo -e "${idsCL[LightGreen]}---------------------------------------------------------------------------------${idsCL[Default]}"
|
||||
echo -e "Node hostname: ${node_hostname}"
|
||||
echo -e "${idsCL[LightGreen]}---------------------------------------------------------------------------${idsCL[Default]}"
|
||||
echo -e "${idsCL[LightGreen]}---------------------------------------------------------------------------------${idsCL[Default]}"
|
||||
echo ""
|
||||
echo " [1] Change Backup Location"
|
||||
echo " [2] Change MySQL User"
|
||||
@@ -171,13 +171,13 @@ case "$1" in
|
||||
;;
|
||||
|
||||
nightlyrenew)
|
||||
rm -f /opt/runcerts/cert-renewal-run-$(hostname)
|
||||
"$0" stop >> /opt/runcerts/cert-renewal-run-$(hostname)
|
||||
# $DAEMON renew >> /opt/runcerts/cert-renewal-run-$(hostname)
|
||||
$DAEMON renew certonly --webroot -w /var/www/html -d $2 >> /opt/runcerts/cert-renewal-run-$(hostname)
|
||||
rm -f /opt/nodemgmt/cert-renewal-run-$(hostname)
|
||||
"$0" stop >> /opt/nodemgmt/cert-renewal-run-$(hostname)
|
||||
# $DAEMON renew >> /opt/nodemgmt/cert-renewal-run-$(hostname)
|
||||
$DAEMON renew certonly --webroot -w /var/www/html -d $2 >> /opt/nodemgmt/cert-renewal-run-$(hostname)
|
||||
chown -R root:letsencrypt /etc/letsencrypt
|
||||
chmod -R 6775 /etc/letsencrypt
|
||||
"$0" start >> /opt/runcerts/cert-renewal-run-$(hostname)
|
||||
"$0" start >> /opt/nodemgmt/cert-renewal-run-$(hostname)
|
||||
exit 0
|
||||
;;
|
||||
|
||||
@@ -196,47 +196,44 @@ case "$1" in
|
||||
esac
|
||||
exit 0;;
|
||||
|
||||
'gui')
|
||||
MAIN_MENU;;
|
||||
'gui') MAIN_MENU;;
|
||||
|
||||
*)
|
||||
echo
|
||||
echo
|
||||
echo "Usage: $0 {new|new-mass|renew|redirect-ssl|stop|start}"
|
||||
echo
|
||||
echo "'new' - Creates a new certificate."
|
||||
echo "---------------------------------------------------------------------------------------"
|
||||
echo "examples:"
|
||||
echo " single-domain = 'runcerts new www.example.com'"
|
||||
echo " multiple-domains = 'runcerts new www.example.com,dev.example.com,...'"
|
||||
echo " single-domain = 'nodemgmt new www.example.com'"
|
||||
echo " multiple-domains = 'nodemgmt new www.example.com,dev.example.com,...'"
|
||||
echo
|
||||
echo "'new-mass' - Creates a new certificate, but doesnt go through the"
|
||||
echo " process of stopping and restarting nginx each time"
|
||||
echo "---------------------------------------------------------------------------------------"
|
||||
echo "examples (same as 'new'):"
|
||||
echo " single-domain = 'runcerts new-mass www.example.com'"
|
||||
echo " multiple-domains = 'runcerts new-mass www.example.com,dev.example.com,...'"
|
||||
echo " single-domain = 'nodemgmt new-mass www.example.com'"
|
||||
echo " multiple-domains = 'nodemgmt new-mass www.example.com,dev.example.com,...'"
|
||||
echo
|
||||
echo "'renew' - Renews all certificates. This command could be run routinly by adding this"
|
||||
echo " line into crontab: \"0 4 * * 0 /usr/local/bin/runcerts renew\""
|
||||
echo " line into crontab: \"0 4 * * 0 /usr/local/bin/nodemgmt renew\""
|
||||
echo "---------------------------------------------------------------------------------------"
|
||||
echo "examples:"
|
||||
echo " 'runcerts renew'"
|
||||
echo " 'nodemgmt renew'"
|
||||
echo
|
||||
echo "'redirect-ssl' - Redirects the configured Artica certificates to use the LetsEncrypt certificates"
|
||||
echo "---------------------------------------------------------------------------------------"
|
||||
echo "examples:"
|
||||
echo " 'runcerts redirect-ssl'"
|
||||
echo " 'nodemgmt redirect-ssl'"
|
||||
echo
|
||||
echo "'stop' - Stops any process that interfere with creating a standalone server"
|
||||
echo "---------------------------------------------------------------------------------------"
|
||||
echo "examples:"
|
||||
echo " 'runcerts stop'"
|
||||
echo " 'nodemgmt stop'"
|
||||
echo
|
||||
echo "'start' - Starts any process that had interfered with creating a standalone server"
|
||||
echo "---------------------------------------------------------------------------------------"
|
||||
echo "examples:"
|
||||
echo " 'runcerts start'"
|
||||
echo " 'nodemgmt start'"
|
||||
echo
|
||||
|
||||
exit 1
|
||||
|
||||
Reference in New Issue
Block a user