scripts

custom scripts and utils
git clone git://git.pyratebeard.net/scripts.git
Log | Files | Refs | README

commit 3366da91b69c59cab7d99886dcd8fa9d93013a4f
parent 5b2ae2dca8d865287addb6a71ceff4241c4b0e53
Author: pyratebeard <root@pyratebeard.net>
Date:   Mon, 10 Jun 2024 21:43:31 +0100

feat(bin): lab script

Diffstat:
Abin/.local/bin/lab | 29+++++++++++++++++++++++++++++
1 file changed, 29 insertions(+), 0 deletions(-)

diff --git a/bin/.local/bin/lab b/bin/.local/bin/lab @@ -0,0 +1,29 @@ +#!/bin/sh +# +# ██ ██ +# ░██ ░██ +# ░██ ██████ ░██ +# ░██ ░░░░░░██ ░██████ +# ░██ ███████ ░██░░░██ +# ░██ ██░░░░██ ░██ ░██ +# ███░░████████░██████ +# ░░░ ░░░░░░░░ ░░░░░ + + +up() { + /usr/bin/wol 00:23:24:b3:03:cb + /usr/bin/wol 00:23:24:b5:75:61 +} + +down() { + ssh pigley 'for r in $(pcs resource --hide-inactive | awk "{print \$2}") ; do pcs resource disable --wait $r ; done' + for node in pigley goatley ; do + ssh $node "systemctl poweroff" + done +} + +case $1 in + up) up ;; + down) down ;; + *) ssh pigley "pcs $@" ;; +esac