浏览代码

Kill ports before restarting nginx

Bob Mottram 7 年前
父节点
当前提交
f71f6d7c1e
共有 2 个文件被更改,包括 5 次插入11 次删除
  1. 5
    4
      src/freedombone-logging
  2. 0
    7
      src/freedombone-upgrade

+ 5
- 4
src/freedombone-logging 查看文件

252
         systemctl restart tor
252
         systemctl restart tor
253
     fi
253
     fi
254
 fi
254
 fi
255
-if [ -d /etc/nginx ]; then
256
-    systemctl restart php7.0-fpm
257
-    systemctl restart nginx
258
-fi
259
 if [ -f /etc/init.d/spamassassin ]; then
255
 if [ -f /etc/init.d/spamassassin ]; then
260
     systemctl restart spamassassin
256
     systemctl restart spamassassin
261
 fi
257
 fi
278
     systemctl restart postgresql
274
     systemctl restart postgresql
279
 fi
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
 exit 0
282
 exit 0

+ 0
- 7
src/freedombone-upgrade 查看文件

132
 # If logging was left on then turn it off
132
 # If logging was left on then turn it off
133
 ${PROJECT_NAME}-logging off
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
 # upgrading file prevents USB canary from activating
135
 # upgrading file prevents USB canary from activating
143
 if [ -f /tmp/.upgrading ]; then
136
 if [ -f /tmp/.upgrading ]; then
144
     rm /tmp/.upgrading
137
     rm /tmp/.upgrading