Fix an nginx conf typo

This commit is contained in:
Julien VAUBOURG
2014-12-28 23:28:09 +01:00
parent 2b1c541caa
commit 6fb227a250
2 changed files with 53 additions and 45 deletions

View File

@@ -174,15 +174,17 @@ moulinette_set() {
fi
}
# Restart php5-fpm at the first start (it needs to be restarted after the slapd start)
if [ ! -e /tmp/.ynh-vpnclient-boot ]; then
if [ "$1" != restart ]; then
# Restart php5-fpm at the first start (it needs to be restarted after the slapd start)
if [ ! -e /tmp/.ynh-vpnclient-boot ]; then
touch /tmp/.ynh-vpnclient-boot
service php5-fpm restart
fi
fi
# Check configuration consistency
# Check configuration consistency
if [[ ! "${1}" =~ stop ]]; then
if [[ ! "${1}" =~ stop ]]; then
exitcode=0
if [ ! -e /etc/openvpn/keys/ca-server.crt ]; then
@@ -197,31 +199,33 @@ if [[ ! "${1}" =~ stop ]]; then
fi
[ "${exitcode}" -ne 0 ] && exit ${exitcode}
fi
fi
# Variables
# Variables
echo -n "Retrieving Yunohost settings... "
echo -n "Retrieving Yunohost settings... "
ynh_server_name=$(moulinette_get server_name)
ynh_server_port=$(moulinette_get server_port)
ynh_server_proto=$(moulinette_get server_proto)
ynh_ip6_addr=$(moulinette_get ip6_addr)
ynh_login_user=$(moulinette_get login_user)
ynh_server_name=$(moulinette_get server_name)
ynh_server_port=$(moulinette_get server_port)
ynh_server_proto=$(moulinette_get server_proto)
ynh_ip6_addr=$(moulinette_get ip6_addr)
ynh_login_user=$(moulinette_get login_user)
old_ip6_gw=$(moulinette_get ip6_gw)
old_wired_device=$(moulinette_get wired_device)
old_server_ip6=$(moulinette_get server_ip6)
old_ip6_gw=$(moulinette_get ip6_gw)
old_wired_device=$(moulinette_get wired_device)
old_server_ip6=$(moulinette_get server_ip6)
new_ip6_gw=$(ip -6 route | grep default\ via | awk '{ print $3 }')
new_wired_device=$(ip route | awk '/default via/ { print $NF; }')
new_server_ip6=$(host "${ynh_server_name}" | awk '/IPv6/ { print $NF; }')
new_ip6_gw=$(ip -6 route | grep default\ via | awk '{ print $3 }')
new_wired_device=$(ip route | awk '/default via/ { print $NF; }')
new_server_ip6=$(host "${ynh_server_name}" | awk '/IPv6/ { print $NF; }')
if [ -z "${new_server_ip6}" ]; then
if [ -z "${new_server_ip6}" ]; then
new_server_ip6=$(host "${ynh_server_name}" 80.67.188.188 | awk '/IPv6/ { print $NF; }')
fi
fi
echo "OK"
echo "OK"
fi
# Script
@@ -306,6 +310,10 @@ case "${1}" in
service ynh-hotspot start
fi
;;
restart)
$0 stop
$0 start
;;
status)
exitcode=0
@@ -358,7 +366,7 @@ case "${1}" in
exit ${exitcode}
;;
*)
echo "Usage: $0 {start|stop|litestop|status}"
echo "Usage: $0 {start|stop|litestop|restart|status}"
exit 1
;;
esac

View File

@@ -18,7 +18,7 @@
location <TPL:NGINX_LOCATION> {
alias <TPL:NGINX_REALPATH>;
if($scheme = http) {
if ($scheme = http) {
rewrite ^ https://$server_name$request_uri? permanent;
}