diff --git a/.bashrc b/.bashrc index b9cbac38e62452a834f6f85cf16508c7bda6d392..3b2c80a993d24bb96fc03e84733619abe91a56dd 100644 --- a/.bashrc +++ b/.bashrc @@ -48,6 +48,7 @@ export PATH=$PATH:$HOME/Documents/Shore/cleanup export PATH=$PATH:$HOME/Documents/Shore/ssh-ca export PATH=$PATH:$HOME/Documents/Shore/ssl-ca export PATH=$PATH:$HOME/.cargo/bin +export PATH=$PATH:$HOME/Documents/bin export PYTHONSTARTUP=~/.pythonstartup export AWS_DEFAULT_PROFILE='shore' export ANSIBLE_VERBOSITY=2 @@ -64,7 +65,6 @@ alias missing-recommends="aptitude search '~RBrecommends:~i'" alias deinstalled="dpkg --get-selections | awk '\$2==\"deinstall\" {print \$1}'" alias ansible-local='ansible localhost -c local -i localhost,' alias ansible-local-playbook='ansible-playbook -i localhost, -c local' -alias gen-ssh-config='cat $HOME/.ssh/config.d/* > $HOME/.ssh/config' alias concat="perl -pe 's/\n/\\\n/g'" alias deconcat="perl -pe 's/\\\n/\n/g'" alias ggo='sudo GOPATH=/usr/share/go go' diff --git a/.githooks/post-merge b/.githooks/post-merge index eca11391b4b5929847643b4fb9dacf5b0945d169..be076ab03a78a600c2ef59517d7b3d05158421ca 100755 --- a/.githooks/post-merge +++ b/.githooks/post-merge @@ -1,5 +1,5 @@ #!/bin/sh set -eu cd "$(git rev-parse --show-toplevel)" -. ./.bashrc -gen-ssh-config +echo Generating SSH config +Documents/bin/gen-ssh-config diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index e3febfd18a476aa5cfeeca1931ecd0957af1c9cb..b27a80bf9e409b949cfef7f6697ebdb4285ee4a7 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -9,6 +9,6 @@ sha: v0.5.3 hooks: - id: shell-lint - files: &shellscripts 'bashrc|post-merge|profile|docker-|train-wifi|renew-certs' + files: &shellscripts 'bashrc|post-merge|profile|docker-|train-wifi|renew-certs|dma-clean|gen-ssh-config' - id: shellcheck files: *shellscripts diff --git a/Documents/bin/dma-clean b/Documents/bin/dma-clean new file mode 100755 index 0000000000000000000000000000000000000000..47931c3b53b86a6bf6c35c2b57c28856dcf9c9b8 --- /dev/null +++ b/Documents/bin/dma-clean @@ -0,0 +1,6 @@ +#!/bin/sh +set -eu +service cron stop +ps aux | awk '/dma|send-mail/ {print $2}' | xargs kill +find /var/spool/dma \! -name flush -delete +service cron start diff --git a/Documents/bin/gen-ssh-config b/Documents/bin/gen-ssh-config new file mode 100755 index 0000000000000000000000000000000000000000..9f5bf14a0e9cbc350700b4681cb12841931c3773 --- /dev/null +++ b/Documents/bin/gen-ssh-config @@ -0,0 +1,3 @@ +#!/bin/sh +set -eu +find "$HOME/.ssh/config.d/" -type f -exec cat {} \; > "$HOME/.ssh/config" diff --git a/Documents/Shore/renew-certs b/Documents/bin/renew-certs similarity index 100% rename from Documents/Shore/renew-certs rename to Documents/bin/renew-certs diff --git a/Documents/train-wifi b/Documents/bin/train-wifi similarity index 100% rename from Documents/train-wifi rename to Documents/bin/train-wifi