shell-base/modules/systemd
kebler.net bcba8bbfd4 refactor shell install scripts
add bindfs and new dir_copy script
2023-01-18 16:50:31 -08:00

40 lines
1.1 KiB
Bash

#!/bin/bash
function sdj(){
journalctl -u "$1" | tail -f -n ${2:-50}
}
function sdjf(){
journalctl -f -u "$1"
}
function sdw(){
sdst "$1" | grep Loaded
}
function sdstate () {
echo $1 state
systemctl show --no-page $1 | grep ActiveState
systemctl show --no-page $1 | grep UnitFileState
systemctl show --no-page $1 | grep LoadState
systemctl show --no-page $1 | grep ExecMainPID
systemctl show --no-page $1 | grep ExecMainStartTimestamp=
systemctl show --no-page $1 | grep ExecMainExitTimestamp=
}
function sdju(){
journalctl --user -u "$1" | tail -f -n ${2:-50}
}
function sdjuf(){
journalctl --user -f -u "$1"
}
function sdwu(){
sdstu "$1" | grep Loaded
}
function sdstateu () {
echo $1 state
systemctl --user show --no-page $1 | grep ActiveState
systemctl --user show --no-page $1 | grep UnitFileState
systemctl --user show --no-page $1 | grep LoadState
systemctl --user show --no-page $1 | grep ExecMainPID
systemctl --user show --no-page $1 | grep ExecMainStartTimestamp=
systemctl --user show --no-page $1 | grep ExecMainExitTimestamp=
}