updating script to new standards
This commit is contained in:
@@ -1,34 +1,40 @@
|
||||
# VPN Client app for YunoHost
|
||||
# VPN Client app for YunoHost
|
||||
# Copyright (C) 2015 Julien Vaubourg <julien@vaubourg.com>
|
||||
# Contribute at https://github.com/labriqueinternet/vpnclient_ynh
|
||||
#
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
location <TPL:NGINX_LOCATION> {
|
||||
alias <TPL:NGINX_REALPATH>;
|
||||
location __PATH__ {
|
||||
|
||||
# Path to source
|
||||
alias __FINALPATH__/ ;
|
||||
|
||||
# Force usage of https
|
||||
if ($scheme = http) {
|
||||
rewrite ^ https://$server_name$request_uri? permanent;
|
||||
}
|
||||
|
||||
# Common parameter to increase upload size limit in conjunction with dedicated php-fpm file
|
||||
client_max_body_size 10G;
|
||||
|
||||
index index.php;
|
||||
|
||||
try_files $uri $uri/ index.php;
|
||||
|
||||
location ~ [^/]\.php(/|$) {
|
||||
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
|
||||
fastcgi_pass unix:/var/run/php5-fpm-<TPL:PHP_NAME>.sock;
|
||||
fastcgi_pass unix:/var/run/php/php7.0-fpm-__NAME__.sock;
|
||||
fastcgi_index index.php;
|
||||
include fastcgi_params;
|
||||
fastcgi_read_timeout 600;
|
||||
@@ -37,5 +43,6 @@ location <TPL:NGINX_LOCATION> {
|
||||
fastcgi_param SCRIPT_FILENAME $request_filename;
|
||||
}
|
||||
|
||||
# Include SSOWAT user panel.
|
||||
include conf.d/yunohost_panel.conf.inc;
|
||||
}
|
@@ -1,24 +1,24 @@
|
||||
; VPN Client app for YunoHost
|
||||
; VPN Client app for YunoHost
|
||||
; Copyright (C) 2015 Julien Vaubourg <julien@vaubourg.com>
|
||||
; Contribute at https://github.com/labriqueinternet/vpnclient_ynh
|
||||
;
|
||||
;
|
||||
; This program is free software: you can redistribute it and/or modify
|
||||
; it under the terms of the GNU Affero General Public License as published by
|
||||
; the Free Software Foundation, either version 3 of the License, or
|
||||
; (at your option) any later version.
|
||||
;
|
||||
;
|
||||
; This program is distributed in the hope that it will be useful,
|
||||
; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
; GNU Affero General Public License for more details.
|
||||
;
|
||||
;
|
||||
; You should have received a copy of the GNU Affero General Public License
|
||||
; along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
; Start a new pool named '<TPL:PHP_NAME>'.
|
||||
|
||||
; Start a new pool named 'www'.
|
||||
; the variable $pool can we used in any directive and will be replaced by the
|
||||
; pool name ('www' here)
|
||||
[<TPL:PHP_NAME>]
|
||||
[__NAMETOCHANGE__]
|
||||
|
||||
; The address on which to accept FastCGI requests.
|
||||
; Valid syntaxes are:
|
||||
@@ -28,7 +28,7 @@
|
||||
; specific port;
|
||||
; '/path/to/unix/socket' - to listen on a unix socket.
|
||||
; Note: This value is mandatory.
|
||||
listen = /var/run/php5-fpm-<TPL:PHP_NAME>.sock
|
||||
listen = /var/run/php/php7.0-fpm-__NAMETOCHANGE__.sock
|
||||
|
||||
; Set permissions for unix socket, if one is used. In Linux, read/write
|
||||
; permissions must be set in order to allow connections from a web server. Many
|
||||
@@ -42,8 +42,8 @@ listen.mode = 0600
|
||||
; Unix user/group of processes
|
||||
; Note: The user is mandatory. If the group is not set, the default user's group
|
||||
; will be used.
|
||||
user = <TPL:PHP_USER>
|
||||
group = <TPL:PHP_GROUP>
|
||||
user = __USER__
|
||||
group = __USER__
|
||||
|
||||
; Choose how the process manager will control the number of child processes.
|
||||
; Possible Values:
|
||||
@@ -157,7 +157,7 @@ request_slowlog_timeout = 0
|
||||
; The log file for slow requests
|
||||
; Default Value: not set
|
||||
; Note: slowlog is mandatory if request_slowlog_timeout is set
|
||||
slowlog = /var/log/nginx/<TPL:PHP_NAME>.slow.log
|
||||
slowlog = /var/log/nginx/[__NAMETOCHANGE__].slow.log
|
||||
|
||||
; Set open file descriptor rlimit.
|
||||
; Default Value: system defined value
|
||||
@@ -171,7 +171,7 @@ rlimit_core = 0
|
||||
; Chdir to this directory at the start.
|
||||
; Note: relative path can be used.
|
||||
; Default Value: current directory or / when chroot
|
||||
chdir = <TPL:NGINX_REALPATH>
|
||||
chdir = __FINALPATH__
|
||||
|
||||
; Redirect worker stdout and stderr into main error log. If not set, stdout and
|
||||
; stderr will be redirected to /dev/null according to FastCGI specs.
|
@@ -238,10 +238,10 @@ ynh_setting_set() {
|
||||
|
||||
if [ "$1" != restart ]; then
|
||||
|
||||
# Restart php5-fpm at the first start (it needs to be restarted after the slapd start)
|
||||
# Restart php-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
|
||||
systemctl restart php5-fpm
|
||||
systemctl restart php7.0-fpm
|
||||
fi
|
||||
|
||||
# Check configuration consistency
|
||||
|
Reference in New Issue
Block a user