1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/gitlab_ynh.git synced 2024-09-03 18:36:35 +02:00

Trying to pass package_check

This commit is contained in:
Pierre Bourré 2019-03-18 08:23:53 +01:00
parent 17bf4db2cf
commit 2dc13b7e84
2 changed files with 22 additions and 17 deletions

View file

@ -137,17 +137,17 @@ gitlab_ctl_action() {
local action=${action:-start} local action=${action:-start}
local timeout=${timeout:-300} local timeout=${timeout:-300}
# Start to read the log
local templog="$(mktemp)"
# Read the specified log file
tail -F -n0 "$log_path" > "$templog" 2>&1 &
# Get the PID of the tail command
local pid_tail=$!
ynh_print_info --message="${action^} gitlab" ynh_print_info --message="${action^} gitlab"
gitlab-ctl $action gitlab-ctl $action
# Start to read the log
local templog="$(mktemp)"
# Read the specified log file
tail -F -n1 "$log_path" > "$templog" 2>&1 &
# Get the PID of the tail command
local pid_tail=$!
# Start the timeout and try to find line_match_new or line_match_existing # Start the timeout and try to find line_match_new or line_match_existing
local i=0 local i=0
for i in $(seq 1 $timeout) for i in $(seq 1 $timeout)
@ -168,17 +168,16 @@ gitlab_ctl_action() {
ynh_print_warn "Error during ${action}ing, reconfiguring and restarting gitlab" ynh_print_warn "Error during ${action}ing, reconfiguring and restarting gitlab"
ynh_clean_check_starting ynh_clean_check_starting
# Start to read the log
local templog="$(mktemp)"
# Read the specified log file
tail -F -n0 "$log_path" > "$templog" 2>&1 &
# Get the PID of the tail command
local pid_tail=$!
gitlab-ctl reconfigure
gitlab-ctl restart gitlab-ctl restart
# Force restart unicorn # Force restart unicorn
gitlab-ctl restart unicorn gitlab-ctl restart unicorn
# Start to read the log
local templog="$(mktemp)"
# Read the specified log file
tail -F -n1 "$log_path" > "$templog" 2>&1 &
# Get the PID of the tail command
local pid_tail=$!
fi fi
if [ $i -eq 3 ]; then if [ $i -eq 3 ]; then
echo -n "Please wait, Gitlab is ${action}ing" >&2 echo -n "Please wait, Gitlab is ${action}ing" >&2

View file

@ -105,6 +105,9 @@ mkdir -p $config_path
cp -f ../conf/gitlab.rb "$config_path/gitlab.rb" cp -f ../conf/gitlab.rb "$config_path/gitlab.rb"
domain="$new_domain"
path_url="$new_path"
ynh_replace_string "__GENERATED_EXTERNAL_URL__" "https://$domain${path_url%/}" "$config_path/gitlab.rb" ynh_replace_string "__GENERATED_EXTERNAL_URL__" "https://$domain${path_url%/}" "$config_path/gitlab.rb"
ynh_replace_string "__PORT__" "$port" "$config_path/gitlab.rb" ynh_replace_string "__PORT__" "$port" "$config_path/gitlab.rb"
ynh_replace_string "__PORTUNICORN__" "$portUnicorn" "$config_path/gitlab.rb" ynh_replace_string "__PORTUNICORN__" "$portUnicorn" "$config_path/gitlab.rb"
@ -115,9 +118,12 @@ ynh_store_file_checksum "$config_path/gitlab.rb"
# RECONFIGURE GITLAB # RECONFIGURE GITLAB
#================================================= #=================================================
gitlab-ctl reconfigure gitlab_ctl_action --action=reconfigure --timeout=3600
gitlab_ctl_action --action=restart --timeout=3600 if [ $change_path -eq 1 ]; then
gitlab-ctl restart
gitlab_ctl_action --action="restart unicorn" --timeout=3600
fi
#================================================= #=================================================
# GENERIC FINALISATION # GENERIC FINALISATION