Skip to content

Commit

Permalink
SSL Certificate update doesn't reload nginx rockstor#2566
Browse files Browse the repository at this point in the history
Use systemctl wrapper to reload nginx post SSL cert
reconfig. From Rockstor v4.5.4-0 onwards nginx is no
longer managed by supervisord.
# Includes
- Nginx reload not restart to avoid Web-UI service
interruption and enable confirmation dialog display.
  • Loading branch information
phillxnet committed Jul 10, 2023
1 parent c11c912 commit 6284eb7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/rockstor/storageadmin/views/tls_certificate.py
Expand Up @@ -26,7 +26,7 @@
from shutil import move
from tempfile import mkstemp
from django.conf import settings
from system.services import superctl
from system.services import systemctl
import logging

logger = logging.getLogger(__name__)
Expand Down Expand Up @@ -89,5 +89,5 @@ def post(self, request):
handle_exception(Exception(e_msg), request)
move(cpath, "%s/rockstor.cert" % settings.CERTDIR)
move(kpath, "%s/rockstor.key" % settings.CERTDIR)
superctl("nginx", "restart")
systemctl("nginx", "reload")
return Response(TLSCertificateSerializer(co).data)

0 comments on commit 6284eb7

Please sign in to comment.