From 9c1c25e4c926ac5bb446bd49e38e793cb8e9101f Mon Sep 17 00:00:00 2001 From: James Swineson Date: Tue, 9 Apr 2019 16:28:57 +0800 Subject: [PATCH] restart ssh daemon immediately after swapping rootfs --- menhera.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/menhera.sh b/menhera.sh index d7a4c10..3ab9b45 100755 --- a/menhera.sh +++ b/menhera.sh @@ -102,12 +102,12 @@ swap_root() { # move mounts for i in dev proc sys run; do mount --move "${OLDROOT}/$i" "${NEWROOT}/$i"; done mount -t tmpfs tmpfs "${NEWROOT}/tmp" + + echo "Restarting SSH daemon..." + systemctl restart ssh } clear_processes() { - echo "Restarting SSH daemon..." - systemctl restart ssh - echo "Disabling swap..." swapoff -a