Skip to content

Commit

Permalink
update code
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisho authored and Vicente-Cheng committed May 23, 2023
1 parent df99cdf commit e78a8c5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
[Unit]
Description=Kill RKE2 Containers for clean unmount
Description=Kill RKE2 Containers
DefaultDependencies=no
RefuseManualStart=yes
Before=reboot.target halt.target shutdown.target poweroff.target umount.target final.target
Before=reboot.target halt.target shutdown.target poweroff.target

[Install]
RequiredBy=reboot.target halt.target shutdown.target poweroff.target umount.target final.target
RequiredBy=reboot.target halt.target shutdown.target poweroff.target

[Service]
Type=oneshot
Expand Down
5 changes: 0 additions & 5 deletions package/harvester-os/files/usr/sbin/rke2-kill-containers.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,6 @@ function list_units() {
systemctl list-units --type=scope --no-legend | grep -Eo "(cri-containerd-.+\.scope)"
}

function get_unit_status() {
local unit_name="$1"
systemctl status "${unit_name}"
}

systemctl stop rke2-server.service || true
systemctl stop rke2-agent.service || true

Expand Down

0 comments on commit e78a8c5

Please sign in to comment.