From: Zoltán Felleg Date: Wed, 12 Jun 2024 11:39:38 +0000 (+0200) Subject: Updated container start/stop scripts. X-Git-Url: http://git.useribm.hu/?a=commitdiff_plain;h=061f5fe43c6989de590a8581e86bcff1d6228006;p=user-lxc.git Updated container start/stop scripts. --- diff --git a/scripts/poweroffall.sh b/scripts/poweroffall.sh deleted file mode 100755 index 9af2adb..0000000 --- a/scripts/poweroffall.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh - - -lxc-ls -1 --running | while read CONTAINER -do - echo "Powering off $CONTAINER" - lxc-attach --name $CONTAINER -- poweroff -done diff --git a/scripts/rebootall.sh b/scripts/rebootall.sh index 3284811..afe8a13 100755 --- a/scripts/rebootall.sh +++ b/scripts/rebootall.sh @@ -1,8 +1,4 @@ #!/bin/sh -lxc-ls -1 --running | while read CONTAINER -do - echo "Rebooting $CONTAINER" - lxc-attach --name $CONTAINER -- reboot -done +lxc-autostart --reboot diff --git a/scripts/restartall.sh b/scripts/restartall.sh new file mode 100755 index 0000000..920475a --- /dev/null +++ b/scripts/restartall.sh @@ -0,0 +1,5 @@ +#!/bin/sh + + +lxc-autostart --shutdown -t 300 +lxc-autostart diff --git a/scripts/shutdownall.sh b/scripts/shutdownall.sh new file mode 100755 index 0000000..0233aa9 --- /dev/null +++ b/scripts/shutdownall.sh @@ -0,0 +1,4 @@ +#!/bin/sh + + +lxc-autostart --shutdown -t 300 diff --git a/scripts/startall.sh b/scripts/startall.sh new file mode 100755 index 0000000..cccc4d2 --- /dev/null +++ b/scripts/startall.sh @@ -0,0 +1,4 @@ +#!/bin/sh + + +lxc-autostart