From 43f2c6b8164c2c261c4ee7252cb6439f31b0dcee Mon Sep 17 00:00:00 2001 From: qiaofeng1227 <76487013@qq.com> Date: Wed, 31 May 2023 11:32:37 +0800 Subject: [PATCH] menu change --- install/install.sh | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/install/install.sh b/install/install.sh index d640d517..0809a1f1 100644 --- a/install/install.sh +++ b/install/install.sh @@ -270,6 +270,7 @@ cp -r /data/stackhubweb/src/apps/build/* /usr/share/cockpit/appstore cp -r /data/stackhubweb/plugins/portainer/build/* /usr/share/cockpit/container cp -r /data/stackhubweb/plugins/nginxproxymanager/build/* /usr/share/cockpit/nginx cp -r /data/stackhubweb/plugins/kopia/build/* /usr/share/cockpit/backup +cp -r /data/stackhubweb/plugins/myapps /usr/share/cockpit # install navigator if [ "$os_type" == 'Ubuntu' ] || [ "$os_type" == 'Debian' ] ;then @@ -428,6 +429,26 @@ sudo docker restart websoft9-nginxproxymanager echo "---------------------------------- Install success! you can install a app by websoft9's appstore -------------------------------------------------------" } +EditMenu(){ + +echo "Start to Edit Cockpit Menu ..." +if [ -e /usr/share/cockpit/systemd ]; then + jq '. | .tools as $menu | .menu as $tools | .tools=$tools | .menu=$menu' /usr/share/cockpit/systemd/manifest.json > /usr/share/cockpit/systemd/manifest.json.tmp + rm -rf /usr/share/cockpit/systemd/manifest.json + mv /usr/share/cockpit/systemd/manifest.json.tmp /usr/share/cockpit/systemd/manifest.json +fi +} +if [ -e /usr/share/cockpit/networkmanager ]; then + sudo sed -i 's/menu/tools/g' /usr/share/cockpit/networkmanager/manifest.json +fi +if [ -e /usr/share/cockpit/storaged ]; then + sudo sed -i 's/menu/tools/g' /usr/share/cockpit/storaged/manifest.json +fi +if [ -e /usr/share/cockpit/users ]; then + sudo sed -i 's/menu/tools/g' /usr/share/cockpit/users/manifest.json +fi +} + CheckEnvironment InstallTools InstallDocker @@ -437,3 +458,4 @@ StartAppMng StartPortainer StartKopia InstallNginx +EditMenu \ No newline at end of file