#!/bin/bash

set -e

RED='\e[1;31m'

if [[ "$EUID" -ne "0" ]]; then
        echo -e $RED "Run this script as root or with the sudo command to continue."
        exit 1
fi

systemctl enable --now virtlockd.socket || true
systemctl enable --now virtlogd.socket || true
systemctl enable --now virtlockd-admin.socket || true
systemctl enable --now virtlogd-admin.socket || true
systemctl enable --now libvirtd.service || true
systemctl enable --now libvirt-guests.service || true
systemctl enable --now virtlockd.service || true
systemctl enable --now virtlogd.service || true
