Skip to content

Instantly share code, notes, and snippets.

@neocturne
Created January 26, 2022 18:51
Show Gist options
  • Save neocturne/a84652bab5ccfb6a1bc5c4bef7cdce6b to your computer and use it in GitHub Desktop.
Save neocturne/a84652bab5ccfb6a1bc5c4bef7cdce6b to your computer and use it in GitHub Desktop.
#!/bin/sh
comm="$(basename "$1")"
exec systemd-cat -t "$comm" -- \
systemd-run \
--unit="$(systemd-escape -m "$comm-r$(systemd-id128 new).scope")" \
--user \
--quiet \
--scope \
--slice-inherit \
--collect \
-- "$@"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment