Update upgrade

This commit is contained in:
ericgaspar 2022-07-24 20:41:48 +02:00
parent 7d28e30e05
commit cc293f70cd

View File

@ -49,7 +49,7 @@ fi
[[ $YNH_APP_ID == "gogs" ]] \ [[ $YNH_APP_ID == "gogs" ]] \
&& [[ "$(cat "/opt/$app/templates/.VERSION")" != 0.11.79.1211 ]] \ && [[ "$(cat "/opt/$app/templates/.VERSION")" != 0.11.79.1211 ]] \
&& ynh_die --message "It look like that you have an old gogs install. You need first upgrade gogs instance (id : $gogs_migrate_id) and after migrate to gitea." && ynh_die --message "It look like that you have an old Gogs install. You need first upgrade Gogs instance (id: $gogs_migrate_id) and after migrate to Gitea."
ynh_handle_app_migration --migration_id=gogs --migration_list=gogs_migrations ynh_handle_app_migration --migration_id=gogs --migration_list=gogs_migrations
if [[ $migration_process -eq 1 ]]; then if [[ $migration_process -eq 1 ]]; then
@ -132,8 +132,7 @@ fi
restart_gitea() { restart_gitea() {
# Set permissions # Set permissions
set_permission set_permission
#ynh_systemd_action -l "Starting new server: tcp:127.0.0.1:" -p "/var/log/$app/gitea.log" -t 30 ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/gitea.log" --line_match="Starting new Web server: tcp:127.0.0.1:"
ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/gitea.log" --line_match="Serving 127.0.0.1:"
# Leave the time to update the database schema # Leave the time to update the database schema
sleep 5 sleep 5
systemctl stop $app systemctl stop $app