update.sh edit

This commit is contained in:
qiaofeng1227 2023-06-20 11:58:43 +08:00
parent 2b0cce2e09
commit a5ec799d92
3 changed files with 16 additions and 4 deletions

View file

@ -273,11 +273,10 @@ cp -r /data/apps/stackhub/cockpit/portainer/build/* /usr/share/cockpit/container
## install nginx
mkdir /usr/share/cockpit/nginx
cp -r /data/apps/stackhub/cockpit/nginxproxymanager/build/* /usr/share/cockpit/nginx
## install kopia
# mkdir /usr/share/cockpit/backup
# cp -r /data/apps/stackhub/cockpit/kopia/build/* /usr/share/cockpit/backup
## install settings
mkdir /usr/share/cockpit/settings
cp -r /data/apps/stackhub/cockpit/settings/build/* /usr/share/cockpit/settings
## install myapps
#cp -r /data/apps/stackhub/appmanage/static/images /data/apps/stackhub/cockpit/myapps/build/static
mkdir /usr/share/cockpit/myapps
cp -r /data/apps/stackhub/cockpit/myapps/build/* /usr/share/cockpit/myapps

View file

@ -248,6 +248,18 @@ else
echo "appstore is not need to update"
fi
# update settings
old_settings_version=$(cat /usr/share/cockpit/settings/manifest.json | jq .version)
new_settings_version=$(cat /data/apps/stackhub/cockpit/settings/build/manifest.json |jq .version)
if [ "$old_settings_version" \< "$new_settings_version" ]; then
echo "settings plugin need to update"
rm -rf /usr/share/cockpit/settings/*
cp -r /data/apps/stackhub/cockpit/settings/build/* /usr/share/cockpit/settings
else
echo "settings is not need to update"
fi
# update myapps
old_myapps_version=$(cat /usr/share/cockpit/myapps/manifest.json | jq .version)
new_myapp_version=$(cat /data/apps/stackhub/cockpit/myapps/build/manifest.json |jq .version)

View file

@ -8,6 +8,7 @@
"PLUGINS": {
"PORTAINER": "1.0.0",
"NGINX": "1.0.0",
"SETTING": "1.0.0",
"MYAPPS": "1.0.2",
"APPSTORE": "1.0.1"
},