Skip to content

Instantly share code, notes, and snippets.

@fepitre
Created October 8, 2023 11:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fepitre/52a8186f319a30f737c7cb7ec6255756 to your computer and use it in GitHub Desktop.
Save fepitre/52a8186f319a30f737c7cb7ec6255756 to your computer and use it in GitHub Desktop.
qvm-create-drop-in.sh
#!/bin/bash
set -eu
if [ "${DEBUG:-0}" == "1" ]; then
set -x
fi
systemd_unit="$1"
if ! [ -e "/etc/systemd/system/${systemd_unit}.d/30_qubes.conf" ]; then
mkdir -p "/etc/systemd/system/${systemd_unit}.d"
cat > "/etc/systemd/system/${systemd_unit}.d/30_qubes.conf" << EOF
[Unit]
ConditionPathExists=/var/run/qubes-service/${systemd_unit}
EOF
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment