Ver código fonte

Kill ports before restarting nginx

Bob Mottram 6 anos atrás
pai
commit
f71f6d7c1e
2 arquivos alterados com 5 adições e 11 exclusões
  1. 5
    4
      src/freedombone-logging
  2. 0
    7
      src/freedombone-upgrade

+ 5
- 4
src/freedombone-logging Ver arquivo

@@ -252,10 +252,6 @@ if [ -d /etc/tor ]; then
252 252
         systemctl restart tor
253 253
     fi
254 254
 fi
255
-if [ -d /etc/nginx ]; then
256
-    systemctl restart php7.0-fpm
257
-    systemctl restart nginx
258
-fi
259 255
 if [ -f /etc/init.d/spamassassin ]; then
260 256
     systemctl restart spamassassin
261 257
 fi
@@ -278,4 +274,9 @@ if [ -d /etc/postgresql ]; then
278 274
     systemctl restart postgresql
279 275
 fi
280 276
 
277
+fuser -k 80/tcp
278
+fuser -k 443/tcp
279
+systemctl restart php7.0-fpm
280
+systemctl restart nginx
281
+
281 282
 exit 0

+ 0
- 7
src/freedombone-upgrade Ver arquivo

@@ -132,13 +132,6 @@ fi
132 132
 # If logging was left on then turn it off
133 133
 ${PROJECT_NAME}-logging off
134 134
 
135
-# This is a hack to fix nginx failures which happen sometimes
136
-# when matrix is installed
137
-if [ -d /etc/matrix ]; then
138
-    systemctl restart matrix
139
-    systemctl restart nginx
140
-fi
141
-
142 135
 # upgrading file prevents USB canary from activating
143 136
 if [ -f /tmp/.upgrading ]; then
144 137
     rm /tmp/.upgrading