mirror of
https://github.com/stefanpejcic/openpanel
synced 2025-06-26 18:28:26 +00:00
Update UPDATE.sh
This commit is contained in:
parent
53c6800ce0
commit
1a8a875f20
@ -77,9 +77,6 @@ FUNCTIONS=(
|
|||||||
#notify user we started
|
#notify user we started
|
||||||
print_header
|
print_header
|
||||||
|
|
||||||
# /etc/openpanel/
|
|
||||||
update_configuration_files
|
|
||||||
|
|
||||||
# update docker openpanel image
|
# update docker openpanel image
|
||||||
download_new_panel
|
download_new_panel
|
||||||
|
|
||||||
@ -90,7 +87,6 @@ FUNCTIONS=(
|
|||||||
add_two_columns_to_plans
|
add_two_columns_to_plans
|
||||||
#########################################
|
#########################################
|
||||||
|
|
||||||
|
|
||||||
# update opencli
|
# update opencli
|
||||||
opencli_update
|
opencli_update
|
||||||
|
|
||||||
@ -156,34 +152,6 @@ print_space_and_line() {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
update_configuration_files() {
|
|
||||||
echo "Updating configuration files in /etc/openpanel/"
|
|
||||||
mkdir -p /etc/openpanel-${PREVIOUS_VERSION}/
|
|
||||||
cp -r /etc/openpanel/ /etc/openpanel-${PREVIOUS_VERSION}/
|
|
||||||
cd /etc/openpanel/
|
|
||||||
|
|
||||||
git stash # stash local conf
|
|
||||||
|
|
||||||
# update from gh
|
|
||||||
if git pull origin main; then
|
|
||||||
echo "Successfully pulled the latest changes."
|
|
||||||
else
|
|
||||||
echo "There were merge conflicts."
|
|
||||||
if git ls-files -u | grep -q "^"; then
|
|
||||||
echo "Conflicted files:"
|
|
||||||
git ls-files -u
|
|
||||||
else
|
|
||||||
echo "No conflicts, but pull failed for another reason."
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
git stash pop # restore local conf
|
|
||||||
mv /etc/openpanel/openadmin/config/terms /etc/openpanel/openadmin/config/terms_accepted_on_update
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
restart_admin_panel_if_needed() {
|
restart_admin_panel_if_needed() {
|
||||||
echo "Restarting OpenAdmin service.."
|
echo "Restarting OpenAdmin service.."
|
||||||
service admin restart
|
service admin restart
|
||||||
|
Loading…
Reference in New Issue
Block a user