2018-01-16 17:13:48 +01:00
|
|
|
#!/bin/bash
|
|
|
|
|
2019-06-16 00:06:51 +02:00
|
|
|
#=================================================
|
|
|
|
# COMMON VARIABLES
|
|
|
|
#=================================================
|
2020-09-27 23:06:12 +02:00
|
|
|
|
2024-02-06 19:19:15 +01:00
|
|
|
upgrade_dolibarr() {
|
2024-03-25 11:11:40 +01:00
|
|
|
ynh_setup_source --source_id="$source_id" --dest_dir="$install_dir" --full_replace=1 \
|
|
|
|
--keep="htdocs/conf/conf.php htdocs/install/install.forced.php"
|
2024-02-06 19:19:15 +01:00
|
|
|
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
|
|
|
|
}
|
|
|
|
|
2019-06-16 00:06:51 +02:00
|
|
|
#=================================================
|
|
|
|
# PERSONAL HELPERS
|
|
|
|
#=================================================
|
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# EXPERIMENTAL HELPERS
|
|
|
|
#=================================================
|
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# FUTURE OFFICIAL HELPERS
|
|
|
|
#=================================================
|