From 172984666ac1841a803df6dcbbd247b790761587 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Pi=C3=A9dallu?= Date: Tue, 26 Mar 2024 21:38:52 +0100 Subject: [PATCH] Oops, missing function --- scripts/_common.sh | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/scripts/_common.sh b/scripts/_common.sh index 944a65e..feab25c 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -8,6 +8,30 @@ # PERSONAL HELPERS #================================================= +upgrade_dolibarr() { + ynh_setup_source --source_id="$source_id" --dest_dir="$install_dir" --full_replace=1 \ + --keep="htdocs/conf/conf.php htdocs/install/install.forced.php" + chmod -R o-rwx "$install_dir" + chown -R "$app:www-data" "$install_dir" + + # Remove the lock if it exists + lock=$install_dir/documents/install.lock + if [ -f "$lock" ]; then + ynh_secure_remove --file="$lock" + fi + + pushd "$install_dir/htdocs/install/" + "php$phpversion" upgrade.php "$current_version" "$new_version" + ynh_exec_fully_quiet sleep 5 + + "php$phpversion" upgrade2.php "$current_version" "$new_version" + ynh_exec_fully_quiet sleep 5 + + "php$phpversion" step5.php "$current_version" "$new_version" + ynh_exec_fully_quiet sleep 5 + popd +} + #================================================= # EXPERIMENTAL HELPERS #=================================================