From 2437dce29625982dee16586d337e472c3bf16491 Mon Sep 17 00:00:00 2001 From: xeruf <27jf@pm.me> Date: Sun, 15 Sep 2024 17:40:45 +0300 Subject: [PATCH] config/bash: move pve aliases --- .config/bash/iridion.bash | 3 ++- .config/bash/na.bash | 17 +++++++++++++++++ .config/bash/nas.bash | 1 + .config/bash/pve.bash | 14 -------------- 4 files changed, 20 insertions(+), 15 deletions(-) create mode 100644 .config/bash/na.bash create mode 120000 .config/bash/nas.bash delete mode 100644 .config/bash/pve.bash diff --git a/.config/bash/iridion.bash b/.config/bash/iridion.bash index e05209f..47b3785 100644 --- a/.config/bash/iridion.bash +++ b/.config/bash/iridion.bash @@ -1,7 +1,7 @@ set -o pipefail alias localip="ip addr show | grep -E '(ens|eth)' | grep -oP '"'(?<=inet\s)\d+(\.\d+){3}'"' | head -1" -ip=$(localip) +ip=`localip` logs() { if test $# -eq 0 @@ -64,6 +64,7 @@ letsencrypt() { hestia v-list-web-domain-ssl $user $domain | grep . >/dev/null && continue #echo "Generating Certificate" >&2 hestia v-add-letsencrypt-domain $user $domain $(hestia v-list-web-domain $user $domain | grep ALIAS | tr -s ' ' | cut -d' ' -f2- | tr ' ' ',') + echo "$domain: ${?}" done echo "Waiting an hour to not trigger letsencrypt rate limits..." time=0 diff --git a/.config/bash/na.bash b/.config/bash/na.bash new file mode 100644 index 0000000..88f4dd5 --- /dev/null +++ b/.config/bash/na.bash @@ -0,0 +1,17 @@ + +[[ $- == *i* ]] && zfs list -d 0 + +alias cluster='scr corosync && scr pvesr' +qcow() { qemu-img convert $1 -O qcow2 ${2:-$1}.qcow2; } +extrac() { + for var; do + arg=${var%.lzo} + out=$(basename ${arg%.vma}) + lzop -x $arg.lzo + vma.py $arg $out || vma.py $(basename $arg) $out && ( + cd $out && find drive-* -exec qemu-img convert {} -O qcow2 $out-{}.qcow2 \; + ) + #vma extract $arg $out && + #( cd $out && find *.raw -exec qemu-img convert {} -O qcow2 $arg-{}.qcow2 \; ) + done +} diff --git a/.config/bash/nas.bash b/.config/bash/nas.bash new file mode 120000 index 0000000..a7a4fc9 --- /dev/null +++ b/.config/bash/nas.bash @@ -0,0 +1 @@ +../shell/server \ No newline at end of file diff --git a/.config/bash/pve.bash b/.config/bash/pve.bash deleted file mode 100644 index 08ffa71..0000000 --- a/.config/bash/pve.bash +++ /dev/null @@ -1,14 +0,0 @@ - -[[ $- == *i* ]] && zfs list -d 0 - -alias cluster='scr corosync && scr pvesr' -qcow() { qemu-img convert $1 -O qcow2 ${2:-$1}.qcow2; } -extrac() { - for var; do - arg=${var%.lzo} - out=$(basename ${arg%.vma}) - lzop -x $arg.lzo - vma extract $arg $out && - ( cd $out && find *.raw -exec qemu-img convert {} -O qcow2 $arg-{}.qcow2 \; ) - done -}