cluster-deployment/src/steps-postinstall/10-wesher.sh
Starbeamrainbowlabs ae586d1b22
Some checks are pending
continuous-integration/laminar-eldarion Build failed with exit code 123 after 3 seconds
wesher: make optional
2022-08-06 20:10:07 +01:00

33 lines
709 B
Bash
Executable file

#!/usr/bin/env bash
if [[ -n "${wesher_secret}" ]]; then
task_begin "Configuring wesher";
cp "./configs/wesher.logrotate" "/etc/logrotate.d/wesher";
chown root:root "/etc/logrotate.d/wesher";
task_end "$?";
task_begin "wesher: joining cluster"
# HACK: Ref https://github.com/costela/wesher/issues/70
#shellcheck disable=SC2154
WESHER_CLUSTER_KEY="${wesher_secret}" wesher /usr/local/sbin/wesher --overlay-net 172.31.250.0/16 --log-level info --join "${wesher_join_ip}" &
sleep 5;
killall wesher;
sleep 5;
task_end "$?";
task_begin "Starting wesher";
sudo systemctl enable --now wesher;
task_end "$?";
else
task_begin "Not configuring wesher: not requested by user";
task_end 0;
fi