Qubes-VM-hardening/install

22 lines
580 B
Plaintext
Raw Normal View History

2018-02-20 17:40:29 -05:00
#!/bin/sh
2018-04-03 10:53:15 -04:00
set -e
2018-02-20 17:40:29 -05:00
[ `id -u` -eq 0 ] || exit
2018-03-29 07:35:34 -04:00
echo "Disabling the pre-release service (if present)..."
2018-04-03 10:53:15 -04:00
systemctl disable vm-sudo-protect.service || true
2018-03-29 07:22:22 -04:00
2018-04-03 10:53:15 -04:00
echo "Installing vm-boot-protect.service..."
2018-03-29 02:57:06 -04:00
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
2018-02-20 17:40:29 -05:00
systemctl daemon-reload
2018-03-29 02:57:06 -04:00
systemctl enable vm-boot-protect.service
2018-02-20 17:40:29 -05:00
2018-04-03 10:53:15 -04:00
echo "Adding defaults in /etc/default/vms..."
# Careful... ownership & mode are not preserved here!
cp -rnv default/vms/* /etc/default/vms
2018-03-29 07:22:22 -04:00
echo
2018-03-29 07:35:34 -04:00
echo "vm-boot-protect installed!"
2018-02-20 17:40:29 -05:00