mirror of
https://github.com/tasket/Qubes-VM-hardening.git
synced 2024-10-01 06:35:42 -04:00
28 lines
726 B
Bash
28 lines
726 B
Bash
#!/bin/bash
|
|
# From https://github.com/tasket/Qubes-VM-hardening
|
|
# installer version 0.8.4
|
|
|
|
set -e
|
|
[ `id -u` -eq 0 ] || exit
|
|
|
|
echo "Disabling the pre-release service (if present)..."
|
|
systemctl disable vm-sudo-protect.service || true
|
|
|
|
echo "Installing vm-boot-protect.service..."
|
|
cp vm-boot-protect.sh /usr/lib/qubes/init
|
|
chmod +x /usr/lib/qubes/init/vm-boot-protect.sh
|
|
cp vm-boot-protect.service /lib/systemd/system
|
|
systemctl daemon-reload
|
|
systemctl enable vm-boot-protect.service
|
|
|
|
echo "Adding defaults in /etc/default/vms..."
|
|
mkdir -p /etc/default/vms
|
|
# Careful... ownership & mode are not preserved here!
|
|
cp -riv default/vms/* /etc/default/vms
|
|
|
|
echo -e "\nvm-boot-protect installed!\n"
|
|
|
|
bash ./configure-sudo-prompt
|
|
exit 0
|
|
|