Skip to content

Commit

Permalink
Update cert-up.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
andyzhshg authored Jul 28, 2021
1 parent ab36d7c commit 526b443
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions cert-up.sh
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,13 @@ generateCrt () {
updateService () {
echo 'begin updateService'
echo 'cp cert path to des'
/bin/python2 ${BASE_ROOT}/crt_cp.py ${CRT_PATH_NAME}
if [ `grep -c "$FIND_MAJORVERSION_STR" $FIND_MAJORVERSION_FILE` -ne '0' ];then
echo "MajorVersion = 7, use system default python2"
python2 ${BASE_ROOT}/crt_cp.py ${CRT_PATH_NAME}
else
echo "MajorVersion < 7"
/bin/python2 ${BASE_ROOT}/crt_cp.py ${CRT_PATH_NAME}
fi
echo 'done updateService'
}

Expand All @@ -79,15 +85,15 @@ reloadWebService () {
echo 'reloading new cert...'
if [ `grep -c "$FIND_MAJORVERSION_STR" $FIND_MAJORVERSION_FILE` -ne '0' ];then
echo "MajorVersion = 7"
synosystemctl restart nginx
synow3tool --gen-all && systemctl reload nginx
else
echo "MajorVersion < 7"
/usr/syno/etc/rc.sysv/nginx.sh reload
fi
echo 'relading Apache 2.2'
stop pkg-apache22
start pkg-apache22
reload pkg-apache22
#echo 'relading Apache 2.2'
#stop pkg-apache22
#start pkg-apache22
#reload pkg-apache22
echo 'done reloadWebService'
}

Expand Down

0 comments on commit 526b443

Please sign in to comment.