X-Git-Url: https://iankelling.org/git/?a=blobdiff_plain;f=primary-setup;h=c9c34b7f414b5846821693307ab3c8ed60461e3f;hb=51c8b40fd2aac71d29dc9298ca65425725ad1edd;hp=e7d70f2eaaf72c257e05be299feaa7bf3a76802d;hpb=b37f31cdee02eab5a7a9bb083688c0a90a973e31;p=distro-setup diff --git a/primary-setup b/primary-setup index e7d70f2..c9c34b7 100755 --- a/primary-setup +++ b/primary-setup @@ -3,7 +3,7 @@ # usage $0 [MAIL_HOST] # setup things which involve being the primary host or not -source /usr/local/lib/err +source /usr/local/lib/bash-bear script_name="${BASH_SOURCE[0]}" script_name="${script_name##*/}" @@ -26,20 +26,8 @@ serm() { if [[ $1 ]]; then new_host=$1 if [[ $new_host == localhost ]]; then - mailhost_p=1 new_host=$HOSTNAME - else - mailhost_p=0 fi - - # https://www.robustperception.io/how-to-have-labels-for-machine-roles - dir=/var/lib/prometheus/node-exporter - if [[ -e $dir ]]; then - cat > $dir/mailhost.prom < $dir/mailhost.prom <