Updated container start/stop scripts.
authorZoltán Felleg <zoltan.felleg@userrendszerhaz.hu>
Wed, 12 Jun 2024 11:39:38 +0000 (13:39 +0200)
committerZoltán Felleg <zoltan.felleg@userrendszerhaz.hu>
Wed, 12 Jun 2024 11:39:38 +0000 (13:39 +0200)
scripts/poweroffall.sh [deleted file]
scripts/rebootall.sh
scripts/restartall.sh [new file with mode: 0755]
scripts/shutdownall.sh [new file with mode: 0755]
scripts/startall.sh [new file with mode: 0755]

diff --git a/scripts/poweroffall.sh b/scripts/poweroffall.sh
deleted file mode 100755 (executable)
index 9af2adb..0000000
+++ /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
index 3284811e9b0bf1182273f4efeccae6d3056e39aa..afe8a13f3044118b2204fb332c987b9dfe9837e0 100755 (executable)
@@ -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 (executable)
index 0000000..920475a
--- /dev/null
@@ -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 (executable)
index 0000000..0233aa9
--- /dev/null
@@ -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 (executable)
index 0000000..cccc4d2
--- /dev/null
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+
+lxc-autostart