From 7bf0e2e1ad831d17c1075e48d8d8c10a1fb5a7af Mon Sep 17 00:00:00 2001 From: Darren <27513732@qq.com> Date: Fri, 6 Oct 2023 11:19:57 +0800 Subject: [PATCH] override menu --- cockpit/menu_override/apps.override.json | 4 ++++ cockpit/menu_override/kdump.override.json | 4 ++++ cockpit/menu_override/machines.override.json | 4 ++++ cockpit/menu_override/packagekit.override.json | 4 ++++ cockpit/menu_override/playground.override.json | 4 ++++ cockpit/menu_override/selinux.override.json | 4 ++++ cockpit/menu_override/session-recording.override.json | 4 ++++ cockpit/menu_override/subscriptions.override.json | 4 ++++ cockpit/menu_override/updates.override.json | 4 ++++ docs/team.md | 2 +- docs/user.md | 6 +++++- install/install_cockpit.sh | 5 +---- systemd/script/crontab.sh | 11 +++++++++++ systemd/script/start_up.sh | 3 ++- 14 files changed, 56 insertions(+), 7 deletions(-) create mode 100644 cockpit/menu_override/apps.override.json create mode 100644 cockpit/menu_override/kdump.override.json create mode 100644 cockpit/menu_override/machines.override.json create mode 100644 cockpit/menu_override/packagekit.override.json create mode 100644 cockpit/menu_override/playground.override.json create mode 100644 cockpit/menu_override/selinux.override.json create mode 100644 cockpit/menu_override/session-recording.override.json create mode 100644 cockpit/menu_override/subscriptions.override.json create mode 100644 cockpit/menu_override/updates.override.json create mode 100644 systemd/script/crontab.sh diff --git a/cockpit/menu_override/apps.override.json b/cockpit/menu_override/apps.override.json new file mode 100644 index 00000000..437ef46f --- /dev/null +++ b/cockpit/menu_override/apps.override.json @@ -0,0 +1,4 @@ +{ + "menu": null, + "tools": null +} \ No newline at end of file diff --git a/cockpit/menu_override/kdump.override.json b/cockpit/menu_override/kdump.override.json new file mode 100644 index 00000000..437ef46f --- /dev/null +++ b/cockpit/menu_override/kdump.override.json @@ -0,0 +1,4 @@ +{ + "menu": null, + "tools": null +} \ No newline at end of file diff --git a/cockpit/menu_override/machines.override.json b/cockpit/menu_override/machines.override.json new file mode 100644 index 00000000..437ef46f --- /dev/null +++ b/cockpit/menu_override/machines.override.json @@ -0,0 +1,4 @@ +{ + "menu": null, + "tools": null +} \ No newline at end of file diff --git a/cockpit/menu_override/packagekit.override.json b/cockpit/menu_override/packagekit.override.json new file mode 100644 index 00000000..437ef46f --- /dev/null +++ b/cockpit/menu_override/packagekit.override.json @@ -0,0 +1,4 @@ +{ + "menu": null, + "tools": null +} \ No newline at end of file diff --git a/cockpit/menu_override/playground.override.json b/cockpit/menu_override/playground.override.json new file mode 100644 index 00000000..437ef46f --- /dev/null +++ b/cockpit/menu_override/playground.override.json @@ -0,0 +1,4 @@ +{ + "menu": null, + "tools": null +} \ No newline at end of file diff --git a/cockpit/menu_override/selinux.override.json b/cockpit/menu_override/selinux.override.json new file mode 100644 index 00000000..437ef46f --- /dev/null +++ b/cockpit/menu_override/selinux.override.json @@ -0,0 +1,4 @@ +{ + "menu": null, + "tools": null +} \ No newline at end of file diff --git a/cockpit/menu_override/session-recording.override.json b/cockpit/menu_override/session-recording.override.json new file mode 100644 index 00000000..437ef46f --- /dev/null +++ b/cockpit/menu_override/session-recording.override.json @@ -0,0 +1,4 @@ +{ + "menu": null, + "tools": null +} \ No newline at end of file diff --git a/cockpit/menu_override/subscriptions.override.json b/cockpit/menu_override/subscriptions.override.json new file mode 100644 index 00000000..437ef46f --- /dev/null +++ b/cockpit/menu_override/subscriptions.override.json @@ -0,0 +1,4 @@ +{ + "menu": null, + "tools": null +} \ No newline at end of file diff --git a/cockpit/menu_override/updates.override.json b/cockpit/menu_override/updates.override.json new file mode 100644 index 00000000..437ef46f --- /dev/null +++ b/cockpit/menu_override/updates.override.json @@ -0,0 +1,4 @@ +{ + "menu": null, + "tools": null +} \ No newline at end of file diff --git a/docs/team.md b/docs/team.md index 4b532de0..c09c91b7 100644 --- a/docs/team.md +++ b/docs/team.md @@ -17,7 +17,7 @@ Create more, better and more realistic software solutions for the world ## Candidate -- [mayo7e](https://github.com/mayo7e): [#296](https://github.com/Websoft9/websoft9/issues/296) +- [mayo7e](https://github.com/mayo7e): [#296](https://github.com/Websoft9/websoft9/issues/296) mayowa.wh@gmail.com ## Honorary Alumni diff --git a/docs/user.md b/docs/user.md index dbd2491c..c843093f 100644 --- a/docs/user.md +++ b/docs/user.md @@ -15,4 +15,8 @@ usermod -aG sudo username #### Can not login when I reinstall my Instance? -Need to clear all cookie at you browser \ No newline at end of file +Need to clear all cookie at you browser + +#### How to modify Websoft9 port? + +Access web console > settings or use cli to modify port \ No newline at end of file diff --git a/install/install_cockpit.sh b/install/install_cockpit.sh index 383ee8d3..d5009c98 100644 --- a/install/install_cockpit.sh +++ b/install/install_cockpit.sh @@ -54,10 +54,9 @@ done echo_prefix_cockpit=$'\n[Cockpit] - ' # package cockpit depends_on [cockpit-bridge,cockpit-ws,cockpit-system], but update cockpit the depends don't update cockpit_packages="cockpit cockpit-ws cockpit-bridge cockpit-system cockpit-pcp cockpit-storaged cockpit-networkmanager cockpit-session-recording cockpit-doc cockpit-packagekit cockpit-sosreport" -cockpit_plugin_delete="apps,machines,selinux,subscriptions,kdump,updates,playground,packagekit,session-recording" menu_overrides_github_page_url="https://websoft9.github.io/websoft9/cockpit/menu_override" cockpit_config_github_page_url="https://websoft9.github.io/websoft9/cockpit/cockpit.conf" -cockpit_menu_overrides=(networkmanager.override.json shell.override.json storaged.override.json systemd.override.json users.override.json) +cockpit_menu_overrides=(networkmanager.override.json shell.override.json storaged.override.json systemd.override.json users.override.json apps.override.json machines.override.json selinux.override.json subscriptions.override.json kdump.override.json updated.override.json playground.override.json packagekit.override.json session-recording.override.json) # export OS release environments if [ -f /etc/os-release ]; then . /etc/os-release @@ -238,8 +237,6 @@ Edit_Menu(){ echo "Download override files from URL..." Download_Menu_Override fi - - echo "$cockpit_plugin_delete" | tr ',' '\n' | sudo xargs -I {} rm -rf "/usr/share/cockpit/{}" } Upgrade_Cockpit(){ diff --git a/systemd/script/crontab.sh b/systemd/script/crontab.sh new file mode 100644 index 00000000..c6d4605c --- /dev/null +++ b/systemd/script/crontab.sh @@ -0,0 +1,11 @@ +#!/bin/bash +PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin + +# monitor config.ini, make sure port is the same with cockpit.socket + +cockpit_port=from config.ini +echo "Change cockpit default port to $cockpit_port ..." +sudo sed -i "s/ListenStream=9090/ListenStream=$cockpit_port/" /lib/systemd/system/cockpit.socket + + + diff --git a/systemd/script/start_up.sh b/systemd/script/start_up.sh index 9b4837ae..061d4d73 100644 --- a/systemd/script/start_up.sh +++ b/systemd/script/start_up.sh @@ -1,4 +1,5 @@ #!/bin/bash /bin/bash send_credentials.sh -/bin/bash set_hosts.sh \ No newline at end of file +/bin/bash set_hosts.sh +/bin/bash crontab.sh \ No newline at end of file