#!/bin/bash

. /etc/os-release
sudo apt install -t ${VERSION_CODENAME}-backports cockpit
exit

ROOT="_cpt_"
HOST="z-$(hostname)"
cat << EOT | sudo tee /etc/cockpit/cockpit.conf
[WebService]
Origins = https://cor.cherished.me wss://cor.cherished.me https://${HOST}.cherished.me wss://${HOST}.cherished.me
ProtocolHeader = X-Forwarded-Proto
UrlRoot=/${ROOT}
EOT
sudo systemctl restart cockpit.socket
