mirror of
https://github.com/YunoHost-Apps/garage_ynh.git
synced 2024-09-03 18:36:32 +02:00
add delay for node id
This commit is contained in:
parent
9eb28a1c0c
commit
7b0b576f1a
3 changed files with 9 additions and 3 deletions
|
@ -377,7 +377,7 @@ ynh_script_progression --message="Starting a systemd service..." --weight=1
|
||||||
### - And the section "STOP SYSTEMD SERVICE" and "START SYSTEMD SERVICE" in the change_url script
|
### - And the section "STOP SYSTEMD SERVICE" and "START SYSTEMD SERVICE" in the change_url script
|
||||||
|
|
||||||
# Start a systemd service
|
# Start a systemd service
|
||||||
ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log"
|
ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log" --line_match="INFO netapp::netapp: Listening on"
|
||||||
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -405,6 +405,12 @@ ynh_script_progression --message="Configuring garage..." --weight=1
|
||||||
garage_command="$final_path/garage -c $final_path/garage.toml"
|
garage_command="$final_path/garage -c $final_path/garage.toml"
|
||||||
|
|
||||||
node_id=$($garage_command node id -q 2>/dev/null | cut -d '@' -f1)
|
node_id=$($garage_command node id -q 2>/dev/null | cut -d '@' -f1)
|
||||||
|
# sometimes server need some time to start
|
||||||
|
if [ -n "$node_id" ]
|
||||||
|
then
|
||||||
|
sleep 5
|
||||||
|
node_id=$($garage_command node id -q 2>/dev/null | cut -d '@' -f1)
|
||||||
|
fi
|
||||||
ynh_app_setting_set --app=$app --key=node_id --value=$node_id
|
ynh_app_setting_set --app=$app --key=node_id --value=$node_id
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -148,7 +148,7 @@ ynh_script_progression --message="Starting a systemd service..." --weight=1
|
||||||
#recreate log folder
|
#recreate log folder
|
||||||
mkdir /var/log/$app
|
mkdir /var/log/$app
|
||||||
|
|
||||||
ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log"
|
ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log" --line_match="INFO netapp::netapp: Listening on"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# RECREATE CONFIGURATION
|
# RECREATE CONFIGURATION
|
||||||
|
|
|
@ -185,7 +185,7 @@ yunohost service add --needs_exposed_ports $port --description="s3 storage" --lo
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Starting a systemd service..." --weight=1
|
ynh_script_progression --message="Starting a systemd service..." --weight=1
|
||||||
|
|
||||||
ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log"
|
ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log" --line_match="INFO netapp::netapp: Listening on"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# RELOAD NGINX
|
# RELOAD NGINX
|
||||||
|
|
Loading…
Add table
Reference in a new issue