diff --git a/tilserv/allowssl b/tilserv/allowssl index 6f27597..010188d 100755 --- a/tilserv/allowssl +++ b/tilserv/allowssl @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +#!/usr/bin/env -S bash -e setfacl -R -m u:"${1}":rx /etc/letsencrypt setfacl -R -m g:"${1}":rx /etc/letsencrypt setfacl -R -m u:"${1}":rx /etc/letsencrypt/live diff --git a/tilserv/countvotes b/tilserv/countvotes index f4b5679..d98242e 100755 --- a/tilserv/countvotes +++ b/tilserv/countvotes @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +#!/usr/bin/env -S bash -e if [ $# -eq 0 ]; then printf 'Usage: %s text\n' "$0" diff --git a/tilserv/delete b/tilserv/delete index 3fd2adb..f48db28 100755 --- a/tilserv/delete +++ b/tilserv/delete @@ -1,4 +1,4 @@ -#!/usr/bin/env -S bash +#!/usr/bin/env -S bash -e [[ -z "$1" ]] && { printf 'Usage: %s username\n' "$0" diff --git a/tilserv/deltuser b/tilserv/deltuser index 5f65387..c517c41 100755 --- a/tilserv/deltuser +++ b/tilserv/deltuser @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env -S bash -e systemctl disable --now $1 rm -rf /etc/systemd/system/"${1}".service userdel -r "${1}" diff --git a/tilserv/peertube-authcode-gen b/tilserv/peertube-authcode-gen index 310c551..8879a3d 100755 --- a/tilserv/peertube-authcode-gen +++ b/tilserv/peertube-authcode-gen @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env -S bash -e client_id="$(curl -s https://pt.vern.cc/api/v1/oauth-clients/local | jq -r '.client_id')" client_secret="$(curl -s https://pt.vern.cc/api/v1/oauth-clients/local | jq -r '.client_secret')" curl -s -X POST \ diff --git a/tilserv/remind b/tilserv/remind index e30dec5..5476802 100755 --- a/tilserv/remind +++ b/tilserv/remind @@ -1,4 +1,4 @@ -#!/usr/bin/env -S bash +#!/usr/bin/env -S bash -e [[ -z "$@" ]] && set -- $(tty) diff --git a/tilserv/ssh-socks b/tilserv/ssh-socks index 3880bf9..c65c8b5 100755 --- a/tilserv/ssh-socks +++ b/tilserv/ssh-socks @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env -S bash -e shopt -s extglob CMD=$(printf "ssh -nNT "; for i in /vm/*; do user="${i##/vm/}"; printf -- "-L /var/socks/%s.sock:/home/%s/.webserver.sock " "$user" "$user"; done; printf 192.168.122.30)