1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/lutim_ynh.git synced 2024-09-03 19:36:24 +02:00

Add $app instead of Lutim

This commit is contained in:
ericgaspar 2020-11-12 15:30:00 +01:00
parent fe14938ee6
commit f7d6ac7e2e
No known key found for this signature in database
GPG key ID: 574F281483054D44
6 changed files with 17 additions and 17 deletions

View file

@ -68,4 +68,4 @@ ynh_backup --src_path="/etc/cron.d/$app"
# END OF SCRIPT # END OF SCRIPT
#================================================= #=================================================
ynh_print_info --message="Backup script completed for Lutim. (YunoHost will then actually copy those files to the archive)." ynh_print_info --message="Backup script completed for $app. (YunoHost will then actually copy those files to the archive)."

View file

@ -33,7 +33,7 @@ port=$(ynh_app_setting_get --app=$app --key=port)
#================================================= #=================================================
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP # BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
#================================================= #=================================================
ynh_script_progression --message="Backing up Lutim before changing its URL (may take a while)..." --weight=20 ynh_script_progression --message="Backing up $app before changing its URL (may take a while)..." --weight=20
# Backup the current version of the app # Backup the current version of the app
ynh_backup_before_upgrade ynh_backup_before_upgrade
@ -163,4 +163,4 @@ ynh_maintenance_mode_OFF
# END OF SCRIPT # END OF SCRIPT
#================================================= #=================================================
ynh_script_progression --message="Change of URL completed for Lutim" --last ynh_script_progression --message="Change of URL completed for $app" --last

View file

@ -104,7 +104,7 @@ ynh_system_user_create $app
#================================================= #=================================================
# SETUP LUTIM # SETUP LUTIM
#================================================= #=================================================
ynh_script_progression --message="Configure Lutim" --weight=2 ynh_script_progression --message="Configure $app" --weight=2
# Configure Lutim # Configure Lutim
cp ../conf/lutim.conf.template "$final_path/lutim.conf" cp ../conf/lutim.conf.template "$final_path/lutim.conf"
@ -147,7 +147,7 @@ chmod +x $final_path/script/lutim
#================================================= #=================================================
# INSTALL LUTIM WITH CARTON # INSTALL LUTIM WITH CARTON
#================================================= #=================================================
ynh_script_progression --message="Installing Lutim with Carton..." --weight=60 ynh_script_progression --message="Installing $app with Carton..." --weight=60
mkdir -p /var/log/$app/ mkdir -p /var/log/$app/
(cd $final_path (cd $final_path
@ -230,7 +230,7 @@ ynh_systemd_action --service_name=nginx --action=reload
#================================================= #=================================================
# CHECK LUTIM BOOTING # CHECK LUTIM BOOTING
#================================================= #=================================================
ynh_script_progression --message="Restarting Lutim..." --weight=6 ynh_script_progression --message="Restarting $app..." --weight=6
# Wait for lutim to be fully started # Wait for lutim to be fully started
ynh_systemd_action --action=restart --line_match="Manager.*started" --log_path="/var/log/$app/production.log" --timeout="120" ynh_systemd_action --action=restart --line_match="Manager.*started" --log_path="/var/log/$app/production.log" --timeout="120"
@ -262,4 +262,4 @@ ynh_send_readme_to_admin --app_message="mail_to_send" --recipients="root" --type
# END OF SCRIPT # END OF SCRIPT
#================================================= #=================================================
ynh_script_progression --message="Installation of Lutim completed" --last ynh_script_progression --message="Installation of $app completed" --last

View file

@ -36,7 +36,7 @@ ynh_remove_systemd_config
# Check if the service is declared in YunoHost # Check if the service is declared in YunoHost
if ynh_exec_fully_quiet yunohost service status $app if ynh_exec_fully_quiet yunohost service status $app
then then
ynh_script_progression --message="Removing Lutim service..." ynh_script_progression --message="Removing $app service..."
yunohost service remove $app yunohost service remove $app
fi fi
@ -51,7 +51,7 @@ ynh_remove_app_dependencies
#================================================= #=================================================
# REMOVE APP MAIN DIR # REMOVE APP MAIN DIR
#================================================= #=================================================
ynh_script_progression --message="Removing Lutim main directory..." --weight=2 ynh_script_progression --message="Removing $app main directory..." --weight=2
# Remove the app directory securely # Remove the app directory securely
ynh_secure_remove --file="$final_path" ynh_secure_remove --file="$final_path"
@ -94,4 +94,4 @@ ynh_system_user_delete --username=$app
# END OF SCRIPT # END OF SCRIPT
#================================================= #=================================================
ynh_script_progression --message="Removal of Lutim completed" --last ynh_script_progression --message="Removal of $app completed" --last

View file

@ -60,7 +60,7 @@ ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
#================================================= #=================================================
# RESTORE THE APP MAIN DIR # RESTORE THE APP MAIN DIR
#================================================= #=================================================
ynh_script_progression --message="Restoring Lutim main directory..." ynh_script_progression --message="Restoring $app main directory..."
ynh_restore_file --origin_path="$final_path" ynh_restore_file --origin_path="$final_path"
@ -135,7 +135,7 @@ ynh_systemd_action --service_name=nginx --action=reload
#================================================= #=================================================
# START AND CHECK LUTIM BOOTING # START AND CHECK LUTIM BOOTING
#================================================= #=================================================
ynh_script_progression --message="Restarting Lutim..." --weight=3 ynh_script_progression --message="Restarting $app..." --weight=3
# Wait for lutim to be fully started # Wait for lutim to be fully started
ynh_systemd_action --action=restart --line_match="Manager.*started" --log_path="/var/log/$app/production.log" --timeout="120" ynh_systemd_action --action=restart --line_match="Manager.*started" --log_path="/var/log/$app/production.log" --timeout="120"
@ -167,4 +167,4 @@ ynh_send_readme_to_admin --app_message="mail_to_send" --recipients="root" --type
# END OF SCRIPT # END OF SCRIPT
#================================================= #=================================================
ynh_script_progression --message="Restoration completed for Lutim" --last ynh_script_progression --message="Restoration completed for $app" --last

View file

@ -137,7 +137,7 @@ ynh_app_setting_set --app=$app --key=unprotected_uris --value="/"
#================================================= #=================================================
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP # BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
#================================================= #=================================================
ynh_script_progression --message="Backing up Lutim before upgrading (may take a while)..." --weight=15 ynh_script_progression --message="Backing up the app before upgrading (may take a while)..." --weight=15
# Backup the current version of the app # Backup the current version of the app
ynh_backup_before_upgrade ynh_backup_before_upgrade
@ -208,7 +208,7 @@ ynh_system_user_create --username=$app
#================================================= #=================================================
# SETUP LUTIM # SETUP LUTIM
#================================================= #=================================================
ynh_script_progression --message="Reconfiguring Lutim..." ynh_script_progression --message="Reconfiguring $app..."
# Overwrite the settings config file only if it's allowed # Overwrite the settings config file only if it's allowed
if [ $overwrite_settings -eq 1 ] if [ $overwrite_settings -eq 1 ]
@ -272,7 +272,7 @@ ynh_replace_string --match_string="__APP__" --replace_string="$app" --target_fil
if [ "$upgrade_type" == "UPGRADE_APP" ] if [ "$upgrade_type" == "UPGRADE_APP" ]
then then
ynh_script_progression --message="Upgrading Lutim with Carton..." --weight=4 ynh_script_progression --message="Upgrading $app with Carton..." --weight=4
(cd $final_path (cd $final_path
carton install 2>&1 | tee -a "/var/log/$app/setup_carton.log") carton install 2>&1 | tee -a "/var/log/$app/setup_carton.log")
fi fi
@ -344,4 +344,4 @@ ynh_send_readme_to_admin --app_message="mail_to_send" --recipients="root" --type
# END OF SCRIPT # END OF SCRIPT
#================================================= #=================================================
ynh_script_progression --message="Upgrade of Lutim completed" --last ynh_script_progression --message="Upgrade of $app completed" --last