Merge branch 'unstable' into services_dbus

This commit is contained in:
Laurent Peuch 2018-05-17 04:48:25 +02:00
commit f9044ab3a3
3 changed files with 34 additions and 1 deletions

View file

@ -117,7 +117,10 @@ ynh_remove_systemd_config () {
# Create a dedicated nginx config # Create a dedicated nginx config
# #
# usage: ynh_add_nginx_config # usage: ynh_add_nginx_config "list of others variables to replace"
#
# | arg: list of others variables to replace separeted by a space
# | for example : 'path_2 port_2 ...'
# #
# This will use a template in ../conf/nginx.conf # This will use a template in ../conf/nginx.conf
# __PATH__ by $path_url # __PATH__ by $path_url
@ -126,8 +129,13 @@ ynh_remove_systemd_config () {
# __NAME__ by $app # __NAME__ by $app
# __FINALPATH__ by $final_path # __FINALPATH__ by $final_path
# #
# And dynamic variables (from the last example) :
# __PATH_2__ by $path_2
# __PORT_2__ by $port_2
#
ynh_add_nginx_config () { ynh_add_nginx_config () {
finalnginxconf="/etc/nginx/conf.d/$domain.d/$app.conf" finalnginxconf="/etc/nginx/conf.d/$domain.d/$app.conf"
local others_var=${1:-}
ynh_backup_if_checksum_is_different "$finalnginxconf" ynh_backup_if_checksum_is_different "$finalnginxconf"
sudo cp ../conf/nginx.conf "$finalnginxconf" sudo cp ../conf/nginx.conf "$finalnginxconf"
@ -151,6 +159,22 @@ ynh_add_nginx_config () {
if test -n "${final_path:-}"; then if test -n "${final_path:-}"; then
ynh_replace_string "__FINALPATH__" "$final_path" "$finalnginxconf" ynh_replace_string "__FINALPATH__" "$final_path" "$finalnginxconf"
fi fi
# Replace all other variable given as arguments
for var_to_replace in $others_var
do
# ${var_to_replace^^} make the content of the variable on upper-cases
# ${!var_to_replace} get the content of the variable named $var_to_replace
ynh_replace_string "__${var_to_replace^^}__" "${!var_to_replace}" "$finalnginxconf"
done
if [ "${path_url:-}" != "/" ]
then
ynh_replace_string "^#sub_path_only" "" "$finalnginxconf"
else
ynh_replace_string "^#root_path_only" "" "$finalnginxconf"
fi
ynh_store_file_checksum "$finalnginxconf" ynh_store_file_checksum "$finalnginxconf"
sudo systemctl reload nginx sudo systemctl reload nginx

View file

@ -101,6 +101,10 @@ ynh_package_install_from_equivs () {
# Build and install the package # Build and install the package
local TMPDIR=$(mktemp -d) local TMPDIR=$(mktemp -d)
# Force the compatibility level at 10, levels below are deprecated
echo 10 > /usr/share/equivs/template/debian/compat
# Note that the cd executes into a sub shell # Note that the cd executes into a sub shell
# Create a fake deb package with equivs-build and the given control file # Create a fake deb package with equivs-build and the given control file
# Install the fake package without its dependencies with dpkg # Install the fake package without its dependencies with dpkg

View file

@ -45,6 +45,11 @@ smtp_tls_exclude_ciphers = $smtpd_tls_exclude_ciphers
smtp_tls_mandatory_ciphers= $smtpd_tls_mandatory_ciphers smtp_tls_mandatory_ciphers= $smtpd_tls_mandatory_ciphers
smtp_tls_loglevel=1 smtp_tls_loglevel=1
# Configure Root CA certificates
# (for example, avoids getting "Untrusted TLS connection established to" messages in logs)
smtpd_tls_CAfile = /etc/ssl/certs/ca-certificates.crt
smtp_tls_CAfile = /etc/ssl/certs/ca-certificates.crt
# See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for # See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
# information on enabling SSL in the smtp client. # information on enabling SSL in the smtp client.