1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/dolibarr_ynh.git synced 2024-09-03 18:35:53 +02:00
dolibarr_ynh/scripts/_common.sh

29 lines
1.2 KiB
Bash
Raw Normal View History

#!/bin/bash
#=================================================
# COMMON VARIABLES AND CUSTOM HELPERS
#=================================================
2024-03-26 21:38:52 +01:00
upgrade_dolibarr() {
ynh_setup_source --source_id="$source_id" --dest_dir="$install_dir" --full_replace \
2024-03-26 21:38:52 +01:00
--keep="htdocs/conf/conf.php htdocs/install/install.forced.php"
#REMOVEME? Assuming the install dir is setup using ynh_setup_source, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chmod -R o-rwx "$install_dir"
#REMOVEME? Assuming the install dir is setup using ynh_setup_source, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chown -R "$app:www-data" "$install_dir"
2024-03-26 21:38:52 +01:00
# Remove the lock if it exists
lock=$install_dir/documents/install.lock
if [ -f "$lock" ]; then
ynh_safe_rm "$lock"
2024-03-26 21:38:52 +01:00
fi
pushd "$install_dir/htdocs/install/"
"php$php_version" upgrade.php "$current_version" "$new_version"
sleep 5
2024-03-26 21:38:52 +01:00
"php$php_version" upgrade2.php "$current_version" "$new_version"
sleep 5
2024-03-26 21:38:52 +01:00
"php$php_version" step5.php "$current_version" "$new_version"
sleep 5
2024-03-26 21:38:52 +01:00
popd
}