From 079f64b3871d60707964e526c6ed9755f4ff927f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pierre=20Bourr=C3=A9?= Date: Sat, 26 Jan 2019 14:30:58 +0100 Subject: [PATCH 1/5] Add some info --- scripts/_common.sh | 13 +++++++++---- scripts/backup | 4 ++++ scripts/change_url | 4 ++++ scripts/install | 4 ++++ scripts/remove | 2 ++ scripts/restore | 4 ++++ 6 files changed, 27 insertions(+), 4 deletions(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index 48f7287..fc6e64f 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -34,6 +34,8 @@ create_dir() { # CONFIGURATION FILE FOR GITLAB #================================================= config_gitlab() { + ynh_print_info "Configuring Gitlab..." + create_dir gitlab_conf_path="$config_path/gitlab.rb" @@ -54,6 +56,8 @@ config_gitlab() { # REMOVE THE CONFIGURATION FILE FOR GITLAB #================================================= remove_config_gitlab() { + ynh_print_info "Removing the configuration file..." + ynh_secure_remove "$config_path/gitlab.rb" } @@ -101,17 +105,20 @@ setup_source() { fi local local_src="/opt/yunohost-apps-src/${YNH_APP_ID}/${src_filename}" + ynh_print_info "Downloading Gitlab files..." + if test -e "$local_src" then # Use the local source file if it is present cp $local_src $src_filename else # If not, download the source - local out=`wget -nv -O $src_filename $src_url 2>&1` || ynh_print_err $out + ynh_print_info $(wget -q --show-progress -O $src_filename $src_url) fi # Check the control sum echo "${src_sum} ${src_filename}" | ${src_sumprg} -c --status \ || ynh_die "Corrupt source" + ynh_print_info "Installing Gitlab..." #Fix for the CI if sudo grep -qa container=lxc /proc/1/environ; then @@ -129,7 +136,7 @@ setup_source() { # This function is inspired by the ynh_systemd_action function waiting_to_start() { - echo "Start Waiting" + ynh_print_info "Waiting for a response from Gitlab..." log_path="/var/log/gitlab/unicorn/current" @@ -164,7 +171,5 @@ waiting_to_start() { echo -n "." >&2 done - echo "Stop Waiting" - clean_check_starting } \ No newline at end of file diff --git a/scripts/backup b/scripts/backup index fad059a..2318748 100644 --- a/scripts/backup +++ b/scripts/backup @@ -44,6 +44,8 @@ ynh_backup "/etc/nginx/conf.d/$domain.d/$app.conf" # BACKUP GITLAB DATABASE #================================================= +ynh_print_info "Backuping of Gitlab..." + # Use gitlab-rake to backup gitlab-rake gitlab:backup:create @@ -53,5 +55,7 @@ ynh_backup "/var/opt/$app/backups/" # BACKUP CONF FILES #================================================= +ynh_print_info "Backuping configuration files of Gitlab..." + ynh_backup "$config_path/gitlab-secrets.json" ynh_backup "$config_path/gitlab.rb" diff --git a/scripts/change_url b/scripts/change_url index bb6fd95..1f67262 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -75,6 +75,8 @@ nginx_conf_path=/etc/nginx/conf.d/$old_domain.d/$app.conf if [ $change_path -eq 1 ] then + ynh_print_info "Changing path..." + sudo gitlab-ctl stop unicorn sudo gitlab-ctl stop sidekiq @@ -90,6 +92,8 @@ fi # Change the domain for nginx if [ $change_domain -eq 1 ] then + ynh_print_info "Changing domain..." + # Delete file checksum for the old conf file location ynh_delete_file_checksum "$nginx_conf_path" mv $nginx_conf_path /etc/nginx/conf.d/$new_domain.d/$app.conf diff --git a/scripts/install b/scripts/install index 38d126d..43966d7 100644 --- a/scripts/install +++ b/scripts/install @@ -58,6 +58,8 @@ ynh_app_setting_set $app use_web_account $use_web_account # FIND AND OPEN PORTS #================================================= +ynh_print_info "Getting ports..." + # Find free ports port=$(ynh_find_port 8080) portUnicorn=$(ynh_find_port $(($port + 1))) @@ -99,6 +101,8 @@ setup_source $architecture # GETTING ADMIN INFO AND ADD AS A GITLAB USER AND CONFIGURE SIGN IN SYSTEM #================================================= +ynh_print_info "Creating an administrator user..." + mailadmin=$(ynh_user_get_info $admin mail) rdmPass=$(ynh_string_random 30) diff --git a/scripts/remove b/scripts/remove index 3094617..0b83296 100644 --- a/scripts/remove +++ b/scripts/remove @@ -28,6 +28,8 @@ portUnicorn=$(ynh_app_setting_get "$app" unicorn_port) # REMOVE GITLAB #================================================= +ynh_print_info "Removing Gitlab..." + # Remove gitlab dpkg --remove gitlab-ce diff --git a/scripts/restore b/scripts/restore index b35babd..410bf28 100644 --- a/scripts/restore +++ b/scripts/restore @@ -70,6 +70,8 @@ ynh_install_app_dependencies openssh-server # RESTORE CONF FILES #================================================= +ynh_print_info "Restoring configuration files of Gitlab..." + ynh_restore_file "$config_path/gitlab-secrets.json" ynh_restore_file "$config_path/gitlab.rb" @@ -87,6 +89,8 @@ ynh_restore_file "/var/opt/$app/backups/" # RESTORE GITLAB DATABASE #================================================= +ynh_print_info "Restoring Gitlab..." + fullfile=$(ls /var/opt/gitlab/backups/*_gitlab* --file -c1 | head -1) basename="/var/opt/gitlab/backups/" filename=$(basename -- "$fullfile") From 2c14e80a2b25e7f1ea5526cdf239d7f48daeedc5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pierre=20Bourr=C3=A9?= Date: Sat, 26 Jan 2019 14:46:52 +0100 Subject: [PATCH 2/5] format files --- manifest.json | 6 +- scripts/_common.sh | 149 ++++++++++++++++++++++----------------------- scripts/backup | 6 +- scripts/change_url | 31 ++++------ scripts/install | 12 ++-- scripts/remove | 10 ++- scripts/restore | 16 ++--- scripts/upgrade | 8 +-- 8 files changed, 113 insertions(+), 125 deletions(-) diff --git a/manifest.json b/manifest.json index e4c7e26..cb1327e 100644 --- a/manifest.json +++ b/manifest.json @@ -22,7 +22,7 @@ "nginx" ], "arguments": { - "install" : [ + "install": [ { "name": "domain", "type": "domain", @@ -44,7 +44,7 @@ }, { "name": "admin", - "type": "user", + "type": "user", "ask": { "en": "Choose an admin user", "fr": "Choisissez l’administrateur" @@ -71,4 +71,4 @@ } ] } -} +} \ No newline at end of file diff --git a/scripts/_common.sh b/scripts/_common.sh index fc6e64f..c02b0a7 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -27,20 +27,20 @@ fi # CREATE FOLDERS #================================================= create_dir() { - mkdir -p "$config_path" + mkdir -p "$config_path" } #================================================= # CONFIGURATION FILE FOR GITLAB #================================================= config_gitlab() { - ynh_print_info "Configuring Gitlab..." + ynh_print_info "Configuring Gitlab..." - create_dir + create_dir gitlab_conf_path="$config_path/gitlab.rb" - ynh_backup_if_checksum_is_different $gitlab_conf_path + ynh_backup_if_checksum_is_different $gitlab_conf_path # Gitlab configuration cp -f ../conf/gitlab.rb $gitlab_conf_path @@ -49,14 +49,14 @@ config_gitlab() { ynh_replace_string "__PORT__" "$port" $gitlab_conf_path ynh_replace_string "__PORTUNICORN__" "$portUnicorn" $gitlab_conf_path - ynh_store_file_checksum $gitlab_conf_path + ynh_store_file_checksum $gitlab_conf_path } #================================================= # REMOVE THE CONFIGURATION FILE FOR GITLAB #================================================= remove_config_gitlab() { - ynh_print_info "Removing the configuration file..." + ynh_print_info "Removing the configuration file..." ynh_secure_remove "$config_path/gitlab.rb" } @@ -80,54 +80,52 @@ update_src_version() { #================================================= # This function is inspired by the ynh_setup_source function, adapted to deal with .deb files setup_source() { - local src_id=${1:-app} # If the argument is not given, source_id equals "app" + local src_id=${1:-app} # If the argument is not given, source_id equals "app" - update_src_version # Update source file + update_src_version # Update source file - # Load value from configuration file (see above for a small doc about this file - # format) - local src_url=$(grep 'SOURCE_URL=' "$YNH_CWD/../conf/${src_id}.src" | cut -d= -f2-) - local src_sum=$(grep 'SOURCE_SUM=' "$YNH_CWD/../conf/${src_id}.src" | cut -d= -f2-) - local src_sumprg=$(grep 'SOURCE_SUM_PRG=' "$YNH_CWD/../conf/${src_id}.src" | cut -d= -f2-) - local src_format=$(grep 'SOURCE_FORMAT=' "$YNH_CWD/../conf/${src_id}.src" | cut -d= -f2-) - local src_extract=$(grep 'SOURCE_EXTRACT=' "$YNH_CWD/../conf/${src_id}.src" | cut -d= -f2-) - local src_in_subdir=$(grep 'SOURCE_IN_SUBDIR=' "$YNH_CWD/../conf/${src_id}.src" | cut -d= -f2-) - local src_filename=$(grep 'SOURCE_FILENAME=' "$YNH_CWD/../conf/${src_id}.src" | cut -d= -f2-) + # Load value from configuration file (see above for a small doc about this file + # format) + local src_url=$(grep 'SOURCE_URL=' "$YNH_CWD/../conf/${src_id}.src" | cut -d= -f2-) + local src_sum=$(grep 'SOURCE_SUM=' "$YNH_CWD/../conf/${src_id}.src" | cut -d= -f2-) + local src_sumprg=$(grep 'SOURCE_SUM_PRG=' "$YNH_CWD/../conf/${src_id}.src" | cut -d= -f2-) + local src_format=$(grep 'SOURCE_FORMAT=' "$YNH_CWD/../conf/${src_id}.src" | cut -d= -f2-) + local src_extract=$(grep 'SOURCE_EXTRACT=' "$YNH_CWD/../conf/${src_id}.src" | cut -d= -f2-) + local src_in_subdir=$(grep 'SOURCE_IN_SUBDIR=' "$YNH_CWD/../conf/${src_id}.src" | cut -d= -f2-) + local src_filename=$(grep 'SOURCE_FILENAME=' "$YNH_CWD/../conf/${src_id}.src" | cut -d= -f2-) - # Default value - src_sumprg=${src_sumprg:-sha256sum} - src_in_subdir=${src_in_subdir:-true} - src_format=${src_format:-tar.gz} - src_format=$(echo "$src_format" | tr '[:upper:]' '[:lower:]') - src_extract=${src_extract:-true} - if [ "$src_filename" = "" ] ; then - src_filename="${src_id}.${src_format}" - fi - local local_src="/opt/yunohost-apps-src/${YNH_APP_ID}/${src_filename}" + # Default value + src_sumprg=${src_sumprg:-sha256sum} + src_in_subdir=${src_in_subdir:-true} + src_format=${src_format:-tar.gz} + src_format=$(echo "$src_format" | tr '[:upper:]' '[:lower:]') + src_extract=${src_extract:-true} + if [ "$src_filename" = "" ]; then + src_filename="${src_id}.${src_format}" + fi + local local_src="/opt/yunohost-apps-src/${YNH_APP_ID}/${src_filename}" - ynh_print_info "Downloading Gitlab files..." + ynh_print_info "Downloading Gitlab files..." - if test -e "$local_src" - then # Use the local source file if it is present - cp $local_src $src_filename - else # If not, download the source - ynh_print_info $(wget -q --show-progress -O $src_filename $src_url) - fi + if test -e "$local_src"; then # Use the local source file if it is present + cp $local_src $src_filename + else # If not, download the source + ynh_print_info $(wget -q --show-progress -O $src_filename $src_url) + fi - # Check the control sum - echo "${src_sum} ${src_filename}" | ${src_sumprg} -c --status \ - || ynh_die "Corrupt source" + # Check the control sum + echo "${src_sum} ${src_filename}" | ${src_sumprg} -c --status || + ynh_die "Corrupt source" - ynh_print_info "Installing Gitlab..." - #Fix for the CI - if sudo grep -qa container=lxc /proc/1/environ; - then - dpkg -i $src_filename || true # This command will fail in lxc env - sed -i 's/command \"cat \/etc\/sysctl.conf \/etc\/sysctl.d\/\*.conf | sysctl -e -p -\"/command \"cat \/etc\/sysctl.conf\"/g' $final_path/embedded/cookbooks/package/resources/sysctl.rb - dpkg --configure gitlab-ce || true - else - dpkg -i $src_filename || true - fi; + ynh_print_info "Installing Gitlab..." + #Fix for the CI + if sudo grep -qa container=lxc /proc/1/environ; then + dpkg -i $src_filename || true # This command will fail in lxc env + sed -i 's/command \"cat \/etc\/sysctl.conf \/etc\/sysctl.d\/\*.conf | sysctl -e -p -\"/command \"cat \/etc\/sysctl.conf\"/g' $final_path/embedded/cookbooks/package/resources/sysctl.rb + dpkg --configure gitlab-ce || true + else + dpkg -i $src_filename || true + fi } #================================================= @@ -136,40 +134,37 @@ setup_source() { # This function is inspired by the ynh_systemd_action function waiting_to_start() { - ynh_print_info "Waiting for a response from Gitlab..." + ynh_print_info "Waiting for a response from Gitlab..." - log_path="/var/log/gitlab/unicorn/current" + log_path="/var/log/gitlab/unicorn/current" - if [ ! -f "$log_path" ] - then - return 0 - fi + if [ ! -f "$log_path" ]; then + return 0 + fi - line_match_new="adopted new unicorn master" - line_match_existing="adopted existing unicorn master" + line_match_new="adopted new unicorn master" + line_match_existing="adopted existing unicorn master" - clean_check_starting() { - # Stop the execution of tail - kill -s 15 $pid_tail 2>&1 - ynh_secure_remove "$templog" 2>&1 - } + clean_check_starting() { + # Stop the execution of tail + kill -s 15 $pid_tail 2>&1 + ynh_secure_remove "$templog" 2>&1 + } - # Following the starting of the app in its log - local templog="$(mktemp)" - tail -F -n1 "$log_path" > "$templog" & - # get the PID of the tail command - local pid_tail=$! + # Following the starting of the app in its log + local templog="$(mktemp)" + tail -F -n1 "$log_path" >"$templog" & + # get the PID of the tail command + local pid_tail=$! - for i in $(seq 1 500) - do - if grep --quiet "${line_match_new}" $templog || grep --quiet "${line_match_existing}" $templog - then - echo "Gitlab has correctly started." >&2 - break - fi - sleep 1 - echo -n "." >&2 - done + for i in $(seq 1 500); do + if grep --quiet "${line_match_new}" $templog || grep --quiet "${line_match_existing}" $templog; then + echo "Gitlab has correctly started." >&2 + break + fi + sleep 1 + echo -n "." >&2 + done - clean_check_starting -} \ No newline at end of file + clean_check_starting +} diff --git a/scripts/backup b/scripts/backup index 2318748..ad64638 100644 --- a/scripts/backup +++ b/scripts/backup @@ -16,9 +16,9 @@ source ../settings/scripts/_common.sh # MANAGE SCRIPT FAILURE #================================================= -ynh_clean_setup () { - - rm /var/opt/gitlab/backups/*_gitlab_backup.tar +ynh_clean_setup() { + + rm /var/opt/gitlab/backups/*_gitlab_backup.tar true } diff --git a/scripts/change_url b/scripts/change_url index 1f67262..7beb23b 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -51,14 +51,12 @@ path_url="$new_path" #================================================= change_domain=0 -if [ "$old_domain" != "$new_domain" ] -then +if [ "$old_domain" != "$new_domain" ]; then change_domain=1 fi change_path=0 -if [ "$old_path" != "$new_path" ] -then +if [ "$old_path" != "$new_path" ]; then change_path=1 fi @@ -73,16 +71,15 @@ fi # Gitlab configuration nginx_conf_path=/etc/nginx/conf.d/$old_domain.d/$app.conf -if [ $change_path -eq 1 ] -then +if [ $change_path -eq 1 ]; then ynh_print_info "Changing path..." - sudo gitlab-ctl stop unicorn - sudo gitlab-ctl stop sidekiq + sudo gitlab-ctl stop unicorn + sudo gitlab-ctl stop sidekiq - # Make a backup of the original nginx config file if modified + # Make a backup of the original nginx config file if modified ynh_backup_if_checksum_is_different "$nginx_conf_path" - # Set global variables for nginx helper + # Set global variables for nginx helper domain="$old_domain" path_url="$new_path" # Create a dedicated nginx config @@ -90,11 +87,10 @@ then fi # Change the domain for nginx -if [ $change_domain -eq 1 ] -then +if [ $change_domain -eq 1 ]; then ynh_print_info "Changing domain..." - # Delete file checksum for the old conf file location + # Delete file checksum for the old conf file location ynh_delete_file_checksum "$nginx_conf_path" mv $nginx_conf_path /etc/nginx/conf.d/$new_domain.d/$app.conf # Store file checksum for the new config file location @@ -109,10 +105,9 @@ config_gitlab sudo gitlab-ctl reconfigure -if [ $change_path -eq 1 ] -then - sudo gitlab-ctl restart - sudo gitlab-ctl restart unicorn +if [ $change_path -eq 1 ]; then + sudo gitlab-ctl restart + sudo gitlab-ctl restart unicorn fi #================================================= @@ -127,4 +122,4 @@ systemctl reload nginx # WAIT #================================================= -waiting_to_start \ No newline at end of file +waiting_to_start diff --git a/scripts/install b/scripts/install index 43966d7..6215a0b 100644 --- a/scripts/install +++ b/scripts/install @@ -40,8 +40,8 @@ ynh_webpath_register $app $domain $path_url #================================================= # Check user parameter -ynh_user_exists "$admin" \ - || ynh_die "The chosen admin user does not exist." +ynh_user_exists "$admin" || + ynh_die "The chosen admin user does not exist." #================================================= # STORE SETTINGS FROM MANIFEST @@ -111,7 +111,7 @@ newuser.admin = true newuser.confirmed_at = Time.now newuser.confirmation_token = nil newuser.save -ApplicationSetting.last.update_attributes(password_authentication_enabled_for_web: $use_web_account, signup_enabled: $use_web_account)" | sudo gitlab-rails console +ApplicationSetting.last.update_attributes(password_authentication_enabled_for_web: $use_web_account, signup_enabled: $use_web_account)" | sudo gitlab-rails console #================================================= # RESTART TO TAKE INTO ACCOUNT CHANGES @@ -125,8 +125,8 @@ sudo gitlab-ctl reconfigure # If app is public, add url to SSOWat conf as skipped_uris if [[ $is_public -eq 1 ]]; then - # unprotected_uris allows SSO credentials to be passed anyway. - ynh_app_setting_set "$app" unprotected_uris "/" + # unprotected_uris allows SSO credentials to be passed anyway. + ynh_app_setting_set "$app" unprotected_uris "/" fi #================================================= @@ -141,4 +141,4 @@ systemctl reload nginx # WAIT #================================================= -waiting_to_start \ No newline at end of file +waiting_to_start diff --git a/scripts/remove b/scripts/remove index 0b83296..981ff8e 100644 --- a/scripts/remove +++ b/scripts/remove @@ -31,7 +31,7 @@ portUnicorn=$(ynh_app_setting_get "$app" unicorn_port) ynh_print_info "Removing Gitlab..." # Remove gitlab -dpkg --remove gitlab-ce +dpkg --remove gitlab-ce #================================================= # REMOVE CONF GILE @@ -61,14 +61,12 @@ ynh_secure_remove "/var/log/$app" # CLOSE PORTS #================================================= -if yunohost firewall list | grep -q "\- $port$" -then +if yunohost firewall list | grep -q "\- $port$"; then echo "Close port $port" >&2 yunohost firewall disallow TCP $port 2>&1 fi -if yunohost firewall list | grep -q "\- $portUnicorn$" -then +if yunohost firewall list | grep -q "\- $portUnicorn$"; then echo "Close port $portUnicorn" >&2 yunohost firewall disallow TCP $portUnicorn 2>&1 fi @@ -83,4 +81,4 @@ ynh_remove_nginx_config # REMOVE LOGROTATE CONFIGURATION #================================================= -#ynh_remove_logrotate \ No newline at end of file +#ynh_remove_logrotate diff --git a/scripts/restore b/scripts/restore index 410bf28..01687b3 100644 --- a/scripts/restore +++ b/scripts/restore @@ -29,9 +29,9 @@ source _common.sh # MANAGE SCRIPT FAILURE #================================================= -ynh_clean_setup () { - - rm /var/opt/gitlab/backups/*_gitlab_backup.tar +ynh_clean_setup() { + + rm /var/opt/gitlab/backups/*_gitlab_backup.tar true } @@ -47,10 +47,10 @@ path_url=$(ynh_app_setting_get "$app" path_url) # CHECK IF THE APP CAN BE RESTORED #================================================= -ynh_webpath_available $domain $path_url \ -|| ynh_die "Path not available: ${domain}${path_url}" -test ! -d $final_path \ -|| ynh_die "There is already a directory: $final_path " +ynh_webpath_available $domain $path_url || + ynh_die "Path not available: ${domain}${path_url}" +test ! -d $final_path || + ynh_die "There is already a directory: $final_path " #================================================= # STANDARD RESTORATION STEPS @@ -111,4 +111,4 @@ gitlab-rake gitlab:check SANITIZE=true # RELOAD NGINX #================================================= -systemctl reload nginx \ No newline at end of file +systemctl reload nginx diff --git a/scripts/upgrade b/scripts/upgrade index 05f6839..281e6d5 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -32,7 +32,7 @@ portUnicorn=$(ynh_app_setting_get "$app" unicorn_port) # Backup the current version of the app ynh_backup_before_upgrade -ynh_clean_setup () { +ynh_clean_setup() { # restore it if the upgrade fails ynh_restore_upgradebackup } @@ -84,8 +84,8 @@ setup_source $architecture # If app is public, add url to SSOWat conf as skipped_uris if [[ $is_public -eq 1 ]]; then - # See install script - ynh_app_setting_set "$app" unprotected_uris "/" + # See install script + ynh_app_setting_set "$app" unprotected_uris "/" fi #================================================= @@ -99,4 +99,4 @@ systemctl reload nginx # WAIT #================================================= -waiting_to_start \ No newline at end of file +waiting_to_start From e2511856156f33f2c2899f8b2f23a518612ab196 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pierre=20Bourr=C3=A9?= Date: Sat, 26 Jan 2019 15:20:50 +0100 Subject: [PATCH 3/5] Fix progress infos --- scripts/_common.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index c02b0a7..8644b51 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -110,7 +110,7 @@ setup_source() { if test -e "$local_src"; then # Use the local source file if it is present cp $local_src $src_filename else # If not, download the source - ynh_print_info $(wget -q --show-progress -O $src_filename $src_url) + wget -q --show-progress -O $src_filename $src_url fi # Check the control sum From 55a299bea655b36ad0ed647fbc4c875a741093ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pierre=20Bourr=C3=A9?= Date: Sat, 26 Jan 2019 15:47:55 +0100 Subject: [PATCH 4/5] method is deprecated, so update conf --- conf/gitlab.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/gitlab.rb b/conf/gitlab.rb index 65eccac..5db7e17 100644 --- a/conf/gitlab.rb +++ b/conf/gitlab.rb @@ -7,7 +7,7 @@ gitlab_rails['ldap_servers'] = YAML.load <<-'EOS' # remember to close this block host: 'localhost' port: 389 uid: 'uid' - method: 'plain' # "tls" or "ssl" or "plain" + encryption: 'plain' # "start_tls" or "simple_tls" or "plain" bind_dn: '' password: '' active_directory: false From 0dc2640b47d7f2f878d9cb8041338e64a4b53886 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pierre=20Bourr=C3=A9?= Date: Sun, 27 Jan 2019 00:31:53 +0100 Subject: [PATCH 5/5] fix restore --- scripts/restore | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/restore b/scripts/restore index 01687b3..04f954a 100644 --- a/scripts/restore +++ b/scripts/restore @@ -17,9 +17,9 @@ if [ ! -e _common.sh ]; then cp ../settings/scripts/_common.sh ./_common.sh mkdir ./upgrade.d mkdir ../conf - cp ../settings/scripts/upgrade.d/*.sh ./upgrade.d/*.sh + cp ../settings/scripts/upgrade.d/*.sh ./upgrade.d/ cp ../settings/conf/*.default ../conf/ - chmod a+rx _common.sh upgrade.d/*.sh + chmod a+rx _common.sh upgrade.d/* fi # Load common variables and helpers