From 3be1dc8325af152889cfb69d1096fee6ca838bf2 Mon Sep 17 00:00:00 2001 From: David Kebler Date: Sat, 3 Aug 2024 14:49:03 -0700 Subject: [PATCH] added some additional systemd utility alias and functions --- load/alias/systemd/root | 3 +++ modules/systemd.lib | 16 ++++++++++++++++ 2 files changed, 19 insertions(+) diff --git a/load/alias/systemd/root b/load/alias/systemd/root index 603e830..e6329bf 100644 --- a/load/alias/systemd/root +++ b/load/alias/systemd/root @@ -11,3 +11,6 @@ alias sdle="systemctl list-unit-files | grep enabled" alias sdpidu="systemctl show --property MainPID --value" alias sdmt="sudo systemctl list-units -t mount --all" alias sded="sudo systemctl edit" +alias sdcat="sudo systemctl cat" +alias sdsh="sudo systemctl show --all" + diff --git a/modules/systemd.lib b/modules/systemd.lib index 7357a06..882f935 100644 --- a/modules/systemd.lib +++ b/modules/systemd.lib @@ -49,4 +49,20 @@ loginctl disable-linger function sdstub { [[ $(loginctl show-user "$USER" --property=Linger | cut -d= -f2) == 'yes' ]] && echo enabled || echo disabled +} + +function sdcatg(){ + systemctl cat "$1" | grep "$2" +} + +function sdshg(){ + systemctl show "$1" | grep "$2" +} + +function sdcatug(){ + systemctl cat --user "$1" | grep "$2" +} + +function sdshug(){ + systemctl show --user "$1" | grep "$2" } \ No newline at end of file