1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/minio_ynh.git synced 2024-09-03 19:46:18 +02:00
This commit is contained in:
ericgaspar 2022-01-30 16:28:10 +01:00
parent 366a34ed3d
commit 1720b5ae1e
No known key found for this signature in database
GPG key ID: 574F281483054D44
4 changed files with 14 additions and 21 deletions

View file

@ -29,11 +29,6 @@ ynh_script_progression --message="Loading installation settings..." --time --wei
# Needed for helper "ynh_add_nginx_config" # Needed for helper "ynh_add_nginx_config"
final_path=$(ynh_app_setting_get --app=$app --key=final_path) final_path=$(ynh_app_setting_get --app=$app --key=final_path)
# Add settings here as needed by your application
#db_name=$(ynh_app_setting_get --app=$app --key=db_name)
#db_user=$db_name
#db_pwd=$(ynh_app_setting_get --app=$app --key=db_pwd)
#================================================= #=================================================
# BACKUP BEFORE CHANGE URL THEN ACTIVE TRAP # BACKUP BEFORE CHANGE URL THEN ACTIVE TRAP
#================================================= #=================================================
@ -74,7 +69,7 @@ fi
#================================================= #=================================================
ynh_script_progression --message="Stopping a systemd service..." --time --weight=1 ynh_script_progression --message="Stopping a systemd service..." --time --weight=1
ynh_systemd_action --service_name=$app --action="stop" --log_path="/var/log/$app/$app.log" ynh_systemd_action --service_name=$app --action="stop" --log_path="systemd"
#================================================= #=================================================
# MODIFY URL IN NGINX CONF # MODIFY URL IN NGINX CONF
@ -118,7 +113,7 @@ fi
#================================================= #=================================================
ynh_script_progression --message="Starting a systemd service..." --time --weight=1 ynh_script_progression --message="Starting a systemd service..." --time --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="systemd"
#================================================= #=================================================
# RELOAD NGINX # RELOAD NGINX

View file

@ -35,9 +35,9 @@ app=$YNH_APP_INSTANCE_NAME
#================================================= #=================================================
# CHECK IF THE APP CAN BE INSTALLED WITH THESE ARGS # CHECK IF THE APP CAN BE INSTALLED WITH THESE ARGS
#================================================= #=================================================
ynh_script_progression --message="Validating installation parameters..." --time --weight=1 ynh_script_progression --message="Validating installation parameters..." --weight=1
final_path=/opt/yunohost/$app final_path="/opt/yunohost/$app"
test ! -e "$final_path" || ynh_die --message="This path already contains a folder" test ! -e "$final_path" || ynh_die --message="This path already contains a folder"
mc_path=$final_path/mc mc_path=$final_path/mc
@ -48,7 +48,7 @@ ynh_webpath_register --app=$app --domain=$domain --path_url=$path_url
#================================================= #=================================================
# STORE SETTINGS FROM MANIFEST # STORE SETTINGS FROM MANIFEST
#================================================= #=================================================
ynh_script_progression --message="Storing installation settings..." --time --weight=1 ynh_script_progression --message="Storing installation settings..." --weight=1
ynh_app_setting_set --app=$app --key=domain --value=$domain ynh_app_setting_set --app=$app --key=domain --value=$domain
ynh_app_setting_set --app=$app --key=path --value=$path_url ynh_app_setting_set --app=$app --key=path --value=$path_url
@ -96,7 +96,7 @@ chmod +x "$final_path/minio"
#================================================= #=================================================
# DOWNLOAD, CHECK AND UNPACK MINIO CLIENT # DOWNLOAD, CHECK AND UNPACK MINIO CLIENT
#================================================= #=================================================
# ynh_script_progression --message="Setting up MinIO client..." --time --weight=1 # ynh_script_progression --message="Setting up MinIO client..." --weight=1
# ynh_setup_source --dest_dir="$mc_path" --source_id="mc" # ynh_setup_source --dest_dir="$mc_path" --source_id="mc"
@ -165,15 +165,15 @@ yunohost service add $app --description="A High Performance, Kubernetes Native O
#================================================= #=================================================
# START SYSTEMD SERVICE # START SYSTEMD SERVICE
#================================================= #=================================================
ynh_script_progression --message="Starting a systemd service..." --time --weight=1 ynh_script_progression --message="Starting a systemd service..." --weight=1
# 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="systemd"
#================================================= #=================================================
# SETUP SSOWAT # SETUP SSOWAT
#================================================= #=================================================
ynh_script_progression --message="Configuring permissions..." --time --weight=1 ynh_script_progression --message="Configuring permissions..." --weight=1
# Make app public if necessary # Make app public if necessary
if [ $is_public -eq 1 ] if [ $is_public -eq 1 ]
@ -184,16 +184,14 @@ fi
#================================================= #=================================================
# RELOAD NGINX # RELOAD NGINX
#================================================= #=================================================
ynh_script_progression --message="Reloading NGINX web server..." --time --weight=1 ynh_script_progression --message="Reloading NGINX web server..." --weight=1
ynh_systemd_action --service_name=nginx --action=reload ynh_systemd_action --service_name=nginx --action=reload
sleep 5
#================================================= #=================================================
# SETUP MINIO CLIENT # SETUP MINIO CLIENT
#================================================= #=================================================
# ynh_script_progression --message="Configuring MinIO client..." --time --weight=1 # ynh_script_progression --message="Configuring MinIO client..." --weight=1
# pushd $mc_path # pushd $mc_path
# ynh_exec_warn_less sudo -u $app ./mc alias set minio "https://$domain" "$app" "$minio_key" # ynh_exec_warn_less sudo -u $app ./mc alias set minio "https://$domain" "$app" "$minio_key"
@ -203,4 +201,4 @@ sleep 5
# END OF SCRIPT # END OF SCRIPT
#================================================= #=================================================
ynh_script_progression --message="Installation of $app completed" --time --last ynh_script_progression --message="Installation of $app completed" --last

View file

@ -118,7 +118,7 @@ yunohost service add $app --description="A High Performance, Kubernetes Native O
#================================================= #=================================================
ynh_script_progression --message="Starting a systemd service..." --time --weight=1 ynh_script_progression --message="Starting a systemd service..." --time --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="systemd"
#================================================= #=================================================
# GENERIC FINALIZATION # GENERIC FINALIZATION

View file

@ -132,7 +132,7 @@ yunohost service add $app --description="A High Performance, Kubernetes Native O
#================================================= #=================================================
ynh_script_progression --message="Starting a systemd service..." --time --weight=1 ynh_script_progression --message="Starting a systemd service..." --time --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="systemd"
#================================================= #=================================================
# RELOAD NGINX # RELOAD NGINX