From 93a38129c05a6338212feef98d678a4481c7fe04 Mon Sep 17 00:00:00 2001 From: Jonas Forsberg Date: Fri, 12 Nov 2021 12:51:33 +0100 Subject: [PATCH] . --- .functions/reset_evolution.sh | 6 ++++++ .functions/restic.sh | 8 ++++++++ .functions/salt.sh | 8 ++++++++ 3 files changed, 22 insertions(+) create mode 100644 .functions/reset_evolution.sh create mode 100644 .functions/restic.sh create mode 100644 .functions/salt.sh diff --git a/.functions/reset_evolution.sh b/.functions/reset_evolution.sh new file mode 100644 index 0000000..3467a99 --- /dev/null +++ b/.functions/reset_evolution.sh @@ -0,0 +1,6 @@ +#!/bin/bash +function reset_evolution() { + # Reset evolution calendar factory + # When it hangs connecting to EWS calendar outlooko365 + EWS_DEBUG=2 /usr/lib/evolution-data-server/evolution-calendar-factory -w +} diff --git a/.functions/restic.sh b/.functions/restic.sh new file mode 100644 index 0000000..6c4d760 --- /dev/null +++ b/.functions/restic.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +function restic(){ + # shellcheck disable=SC1090 + source "$HOME"/.restic/restic.env + /usr/bin/restic --cacert="$HOME"/.restic/cert.pem "$@" +} + diff --git a/.functions/salt.sh b/.functions/salt.sh new file mode 100644 index 0000000..4c9a631 --- /dev/null +++ b/.functions/salt.sh @@ -0,0 +1,8 @@ +#!/bin/bash +function salt() { + if [[ "$1" == "state.apply" ]]; then + sudo salt-call --local --file-root "$HOME/salt/states" --pillar-root "$HOME/salt/pillars" "$@" pillar="{username: $USER}" + elseĀ· + sudo salt-call --local --file-root "$HOME/salt/states" --pillar-root "$HOME/salt/pillars" "$@" + fi +}