|
|
|
@ -37,7 +37,7 @@
|
|
|
|
#define systemd_config_path "resource:///com/ublinux/csv/systemd_conf.csv"
|
|
|
|
#define systemd_config_path "resource:///com/ublinux/csv/systemd_conf.csv"
|
|
|
|
|
|
|
|
|
|
|
|
#define load_services_command \
|
|
|
|
#define load_services_command \
|
|
|
|
"systemctl --property=Names,Description,LoadState,ActiveState,SubState,UnitFileState,ActiveEnterTimestampMonotonic,InactiveEnterTimestampMonotonic " \
|
|
|
|
"systemctl --property=Names,Description,LoadState,ActiveState,SubState,UnitFileState,FragmentPath,ActiveEnterTimestampMonotonic,InactiveEnterTimestampMonotonic " \
|
|
|
|
"--no-pager --all --no-legend show -- $( { " \
|
|
|
|
"--no-pager --all --no-legend show -- $( { " \
|
|
|
|
"systemctl list-units --no-pager --all --plain --no-legend | sed -E 's/^([^ ]+).*/\\1/'; " \
|
|
|
|
"systemctl list-units --no-pager --all --plain --no-legend | sed -E 's/^([^ ]+).*/\\1/'; " \
|
|
|
|
"systemctl list-unit-files --no-pager --no-legend | sed -E 's/^([^ ]+).*/\\1/'; " \
|
|
|
|
"systemctl list-unit-files --no-pager --no-legend | sed -E 's/^([^ ]+).*/\\1/'; " \
|
|
|
|
@ -46,11 +46,11 @@
|
|
|
|
"{ for (i=1; i<=NF; i++) { split($i, kv, \"=\"); val[kv[1]] = kv[2]; } " \
|
|
|
|
"{ for (i=1; i<=NF; i++) { split($i, kv, \"=\"); val[kv[1]] = kv[2]; } " \
|
|
|
|
"print val[\"Names\"] \";\" val[\"LoadState\"] \";\" val[\"ActiveState\"] \";\" val[\"SubState\"] \";\" " \
|
|
|
|
"print val[\"Names\"] \";\" val[\"LoadState\"] \";\" val[\"ActiveState\"] \";\" val[\"SubState\"] \";\" " \
|
|
|
|
"val[\"Description\"] \";\" val[\"UnitFileState\"] \";\" val[\"ActiveEnterTimestampMonotonic\"] \";\" " \
|
|
|
|
"val[\"Description\"] \";\" val[\"UnitFileState\"] \";\" val[\"ActiveEnterTimestampMonotonic\"] \";\" " \
|
|
|
|
"val[\"InactiveEnterTimestampMonotonic\"]; delete val }'"
|
|
|
|
"val[\"InactiveEnterTimestampMonotonic\"] \";\" val[\"FragmentPath\"]; delete val }'"
|
|
|
|
|
|
|
|
|
|
|
|
#define load_system_units_command "systemctl list-unit-files --no-pager --all --plain --no-legend |sed -E 's/(\\S+)\\s+(\\S+)\\s+(\\S+)(.*)/\\1/'"
|
|
|
|
#define load_system_units_command "systemctl list-unit-files --no-pager --all --plain --no-legend |sed -E 's/(\\S+)\\s+(\\S+)\\s+(\\S+)(.*)/\\1/'"
|
|
|
|
#define load_user_units_command yon_char_unite(\
|
|
|
|
#define load_user_units_command yon_char_unite(\
|
|
|
|
"systemctl --property=Names,Description,LoadState,ActiveState,SubState,UnitFileState,ActiveEnterTimestampMonotonic,InactiveEnterTimestampMonotonic " \
|
|
|
|
"systemctl --property=Names,Description,LoadState,ActiveState,SubState,UnitFileState,FragmentPath,ActiveEnterTimestampMonotonic,InactiveEnterTimestampMonotonic " \
|
|
|
|
"--no-pager --all --no-legend show -- $( { " \
|
|
|
|
"--no-pager --all --no-legend show -- $( { " \
|
|
|
|
"systemctl --user --machine=",yon_ubl_root_user_get(),"@ list-units --no-pager --all --plain --no-legend | sed -E 's/^([^ ]+).*/\\1/'; " \
|
|
|
|
"systemctl --user --machine=",yon_ubl_root_user_get(),"@ list-units --no-pager --all --plain --no-legend | sed -E 's/^([^ ]+).*/\\1/'; " \
|
|
|
|
"systemctl --user --machine=",yon_ubl_root_user_get(),"@ list-unit-files --no-pager --no-legend | sed -E 's/^([^ ]+).*/\\1/'; " \
|
|
|
|
"systemctl --user --machine=",yon_ubl_root_user_get(),"@ list-unit-files --no-pager --no-legend | sed -E 's/^([^ ]+).*/\\1/'; " \
|
|
|
|
@ -59,7 +59,7 @@
|
|
|
|
"{ for (i=1; i<=NF; i++) { split($i, kv, \"=\"); val[kv[1]] = kv[2]; } " \
|
|
|
|
"{ for (i=1; i<=NF; i++) { split($i, kv, \"=\"); val[kv[1]] = kv[2]; } " \
|
|
|
|
"print val[\"Names\"] \";\" val[\"LoadState\"] \";\" val[\"ActiveState\"] \";\" val[\"SubState\"] \";\" " \
|
|
|
|
"print val[\"Names\"] \";\" val[\"LoadState\"] \";\" val[\"ActiveState\"] \";\" val[\"SubState\"] \";\" " \
|
|
|
|
"val[\"Description\"] \";\" val[\"UnitFileState\"] \";\" val[\"ActiveEnterTimestampMonotonic\"] \";\" " \
|
|
|
|
"val[\"Description\"] \";\" val[\"UnitFileState\"] \";\" val[\"ActiveEnterTimestampMonotonic\"] \";\" " \
|
|
|
|
"val[\"InactiveEnterTimestampMonotonic\"]; delete val }'",NULL)
|
|
|
|
"val[\"InactiveEnterTimestampMonotonic\"] \";\" val[\"FragmentPath\"]; delete val }'",NULL)
|
|
|
|
#define load_user_services_command yon_char_unite("systemctl --user --machine=",yon_ubl_root_user_get(),"@ list-units --no-pager --all --plain --no-legend |sed -E 's/(\\S+)\\s+(\\S+)\\s+(\\S+)\\s+(\\S+)\\s+(.*)/\\1;\\2;\\3;\\4;\\5/'",NULL)
|
|
|
|
#define load_user_services_command yon_char_unite("systemctl --user --machine=",yon_ubl_root_user_get(),"@ list-units --no-pager --all --plain --no-legend |sed -E 's/(\\S+)\\s+(\\S+)\\s+(\\S+)\\s+(\\S+)\\s+(.*)/\\1;\\2;\\3;\\4;\\5/'",NULL)
|
|
|
|
#define load_system_services_command "systemctl --system list-units --no-pager --all |grep -E \"^ \" |grep -v \"UNIT\" |sed -e 's/ */;/g' -e 's/^;//g' |cut -f1 -d';'"
|
|
|
|
#define load_system_services_command "systemctl --system list-units --no-pager --all |grep -E \"^ \" |grep -v \"UNIT\" |sed -e 's/ */;/g' -e 's/^;//g' |cut -f1 -d';'"
|
|
|
|
#define load_enabled_command "systemctl list-unit-files --no-pager --state=enabled --all |sed -e 's/ */:/g' -e 's/ *: */:/g'|cut -f1 -d:"
|
|
|
|
#define load_enabled_command "systemctl list-unit-files --no-pager --state=enabled --all |sed -e 's/ */:/g' -e 's/ *: */:/g'|cut -f1 -d:"
|
|
|
|
@ -74,18 +74,18 @@
|
|
|
|
#define user_check_active_command(target) yon_char_unite("systemctl --user --machine=",yon_ubl_root_user_get(),"@ is-active ",target,NULL)
|
|
|
|
#define user_check_active_command(target) yon_char_unite("systemctl --user --machine=",yon_ubl_root_user_get(),"@ is-active ",target,NULL)
|
|
|
|
#define user_check_enabled_command(target) yon_char_unite("systemctl --user --machine=",yon_ubl_root_user_get(),"@ is-enabled ",target,NULL)
|
|
|
|
#define user_check_enabled_command(target) yon_char_unite("systemctl --user --machine=",yon_ubl_root_user_get(),"@ is-enabled ",target,NULL)
|
|
|
|
|
|
|
|
|
|
|
|
#define load_system_service_single(target) yon_char_unite("systemctl --property=Names,Description,LoadState,ActiveState,SubState,UnitFileState,ActiveEnterTimestampMonotonic,InactiveEnterTimestampMonotonic --no-pager --all --no-legend show -- ",target,\
|
|
|
|
#define load_system_service_single(target) yon_char_unite("systemctl --property=Names,Description,LoadState,ActiveState,SubState,UnitFileState,FragmentPath,ActiveEnterTimestampMonotonic,InactiveEnterTimestampMonotonic --no-pager --all --no-legend show -- ",target,\
|
|
|
|
"awk 'BEGIN { RS=\"\"; FS=\"\\n\" } " \
|
|
|
|
"awk 'BEGIN { RS=\"\"; FS=\"\\n\" } " \
|
|
|
|
"{ for (i=1; i<=NF; i++) { split($i, kv, \"=\"); val[kv[1]] = kv[2]; } " \
|
|
|
|
"{ for (i=1; i<=NF; i++) { split($i, kv, \"=\"); val[kv[1]] = kv[2]; } " \
|
|
|
|
"print val[\"Names\"] \";\" val[\"LoadState\"] \";\" val[\"ActiveState\"] \";\" val[\"SubState\"] \";\" " \
|
|
|
|
"print val[\"Names\"] \";\" val[\"LoadState\"] \";\" val[\"ActiveState\"] \";\" val[\"SubState\"] \";\" " \
|
|
|
|
"val[\"Description\"] \";\" val[\"UnitFileState\"] \";\" val[\"ActiveEnterTimestampMonotonic\"] \";\" " \
|
|
|
|
"val[\"Description\"] \";\" val[\"UnitFileState\"] \";\" val[\"ActiveEnterTimestampMonotonic\"] \";\" " \
|
|
|
|
"val[\"InactiveEnterTimestampMonotonic\"]; delete val }'",NULL)
|
|
|
|
"val[\"InactiveEnterTimestampMonotonic\"] \";\" val[\"FragmentPath\"]; delete val }'",NULL)
|
|
|
|
#define load_user_service_single(target) yon_char_unite("systemctl --user --machine=",yon_ubl_root_user_get(),"@ --property=Names,Description,LoadState,ActiveState,SubState,UnitFileState,ActiveEnterTimestampMonotonic,InactiveEnterTimestampMonotonic --no-pager --all --no-legend show -- ",target,\
|
|
|
|
#define load_user_service_single(target) yon_char_unite("systemctl --user --machine=",yon_ubl_root_user_get(),"@ --property=Names,Description,LoadState,ActiveState,SubState,UnitFileState,FragmentPath,ActiveEnterTimestampMonotonic,InactiveEnterTimestampMonotonic --no-pager --all --no-legend show -- ",target,\
|
|
|
|
"awk 'BEGIN { RS=\"\"; FS=\"\\n\" } " \
|
|
|
|
"awk 'BEGIN { RS=\"\"; FS=\"\\n\" } " \
|
|
|
|
"{ for (i=1; i<=NF; i++) { split($i, kv, \"=\"); val[kv[1]] = kv[2]; } " \
|
|
|
|
"{ for (i=1; i<=NF; i++) { split($i, kv, \"=\"); val[kv[1]] = kv[2]; } " \
|
|
|
|
"print val[\"Names\"] \";\" val[\"LoadState\"] \";\" val[\"ActiveState\"] \";\" val[\"SubState\"] \";\" " \
|
|
|
|
"print val[\"Names\"] \";\" val[\"LoadState\"] \";\" val[\"ActiveState\"] \";\" val[\"SubState\"] \";\" " \
|
|
|
|
"val[\"Description\"] \";\" val[\"UnitFileState\"] \";\" val[\"ActiveEnterTimestampMonotonic\"] \";\" " \
|
|
|
|
"val[\"Description\"] \";\" val[\"UnitFileState\"] \";\" val[\"ActiveEnterTimestampMonotonic\"] \";\" " \
|
|
|
|
"val[\"InactiveEnterTimestampMonotonic\"]; delete val }'",NULL)
|
|
|
|
"val[\"InactiveEnterTimestampMonotonic\"] \";\" val[\"FragmentPath\"]; delete val }'",NULL)
|
|
|
|
|
|
|
|
|
|
|
|
#define service_info_command(target) yon_char_append("systemctl status -l --no-pager ",target)
|
|
|
|
#define service_info_command(target) yon_char_append("systemctl status -l --no-pager ",target)
|
|
|
|
#define get_log_command(target) yon_char_append("journalctl --all --no-pager --unit ",target)
|
|
|
|
#define get_log_command(target) yon_char_append("journalctl --all --no-pager --unit ",target)
|
|
|
|
|