2
0
mirror of https://github.com/acepanel/panel.git synced 2026-02-04 18:27:13 +08:00

feat: 自启动podman-restart

This commit is contained in:
耗子
2024-06-13 02:38:29 +08:00
parent ec10cd30a5
commit a36eaf7e9a
3 changed files with 12 additions and 3 deletions

View File

@@ -35,7 +35,9 @@ else
fi
systemctl enable podman
systemctl enable podman-restart
systemctl start podman
systemctl start podman-restart
panel writePlugin podman ${podmanVersion}
echo -e ${HR}

View File

@@ -21,7 +21,10 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
HR="+----------------------------------------------------"
OS=$(source /etc/os-release && { [[ "$ID" == "debian" ]] && echo "debian"; } || { [[ "$ID" == "centos" ]] || [[ "$ID" == "rhel" ]] || [[ "$ID" == "rocky" ]] || [[ "$ID" == "almalinux" ]] && echo "centos"; } || echo "unknown")
systemctl stop podman-restart
systemctl stop podman
systemctl disable podman-restart
systemctl disable podman
if [ "${OS}" == "centos" ]; then

View File

@@ -106,11 +106,15 @@ if version_lt "$oldVersion" "2.2.4"; then
fi
fi
if version_lt "$oldVersion" "2.2.6"; then
echo "更新面板到 v2.2.6 ..."
echo "Update panel to v2.2.6 ..."
if version_lt "$oldVersion" "2.2.9"; then
echo "更新面板到 v2.2.9 ..."
echo "Update panel to v2.2.9 ..."
if [ -f "/usr/bin/podman" ]; then
panel writePlugin podman 4.0.0
systemctl enable podman
systemctl enable podman-restart
systemctl start podman
systemctl start podman-restart
fi
fi