Skip to content
Snippets Groups Projects
Commit 47e90035 authored by hmangeart's avatar hmangeart
Browse files

expected unary operator + add nginx reload to ERR trap

parent b5198494
No related branches found
No related tags found
No related merge requests found
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
trap "cp /tmp/{mediaserver-msuser.conf,skyreach.conf,msmonitor.conf} /etc/nginx/sites-available/; exit 255" ERR trap "cp /tmp/{mediaserver-msuser.conf,skyreach.conf,msmonitor.conf} /etc/nginx/sites-available/; nginx -t && service nginx reload; exit 255" ERR
source /root/envsetup/global-conf.sh source /root/envsetup/global-conf.sh
LE_DIR="/etc/letsencrypt/live/" LE_DIR="/etc/letsencrypt/live/"
...@@ -60,13 +60,13 @@ sed -i s/#rewrite/rewrite/ mediaserver-msuser.conf skyreach.conf msmonitor.conf ...@@ -60,13 +60,13 @@ sed -i s/#rewrite/rewrite/ mediaserver-msuser.conf skyreach.conf msmonitor.conf
# CHECK CERTS PRESENCE & EDIT NGINX CONFIG # CHECK CERTS PRESENCE & EDIT NGINX CONFIG
set +e set +e
[ -f ${LE_DIR}/${MS_SERVER_NAME}/{fullchain.pem,privkey.pem} ] && \ [ -f ${LE_DIR}/${MS_SERVER_NAME}/fullchain.pem ] && \
sed -i s/#ssl_certificate/ssl_certificate/g mediaserver-msuser.conf sed -i s/#ssl_certificate/ssl_certificate/g mediaserver-msuser.conf
[ -f ${LE_DIR}/${CM_SERVER_NAME}/{fullchain.pem,privkey.pem} ] && \ [ -f ${LE_DIR}/${CM_SERVER_NAME}/fullchain.pem ] && \
sed -i s/#ssl_certificate/ssl_certificate/g skyreach.conf sed -i s/#ssl_certificate/ssl_certificate/g skyreach.conf
[ -f ${LE_DIR}/${MONITOR_SERVER_NAME}/{fullchain.pem,privkey.pem} ] && \ [ -f ${LE_DIR}/${MONITOR_SERVER_NAME}/fullchain.pem ] && \
sed -i s/#ssl_certificate/ssl_certificate/g msmonitor.conf sed -i s/#ssl_certificate/ssl_certificate/g msmonitor.conf
# RELOAD NGINX IF CONF IS CORRECT # RELOAD NGINX IF CONF IS CORRECT
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment