Difference between revisions of "/usr/lib/sysstat/debian-sa1"
Jump to navigation
Jump to search
(6 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
<code>/usr/lib/sysstat/debian-sa1</code> | <code>/usr/lib/sysstat/debian-sa1</code> | ||
− | + | == Ubuntu 22.04.1 LTS == | |
− | !/bin/sh | + | #!/bin/sh |
− | # vim:ts=2:et | + | # vim:ts=2:et |
− | # Debian sa1 helper which is run from cron.d job, not to needlessly | + | # Debian sa1 helper which is run from cron.d job, not to needlessly |
− | # fill logs (see Bug#499461). | + | # fill logs (see Bug#499461). |
+ | |||
+ | set -e | ||
+ | |||
+ | # Skip in favour of systemd timer | ||
+ | [ ! -d [[/run/systemd/system ]]] || exit 0 | ||
+ | |||
+ | # Our configuration file | ||
+ | DEFAULT=/etc/default/sysstat | ||
+ | # Default setting, overridden in the above file | ||
+ | ENABLED=false | ||
+ | |||
+ | # Read defaults file | ||
+ | [ ! -r "$DEFAULT" ] || . "$DEFAULT" | ||
+ | |||
+ | [ "$ENABLED" = "true" ] || exit 0 | ||
+ | |||
+ | [[exec]] [[/usr/lib/sysstat/sa1]] "$@" | ||
− | set -e | + | == Ubuntu == |
− | + | !/bin/sh | |
− | # Global variables: | + | # vim:ts=2:et |
− | # | + | # Debian sa1 helper which is run from cron.d job, not to needlessly |
− | # our configuration file | + | # fill logs (see Bug#499461). |
− | DEFAULT=/etc/default/sysstat | + | |
− | # default setting, overriden in the above file | + | set -e |
− | ENABLED=false | + | |
− | + | # Global variables: | |
− | # Read defaults file | + | # |
− | if [ -r "$DEFAULT" ]; then | + | # our configuration file |
− | + | DEFAULT=[[/etc/default/sysstat]] | |
− | fi | + | # default setting, overriden in the above file |
− | + | ENABLED=false | |
− | if [ "true" = "$ENABLED" ]; then | + | |
− | + | # Read defaults file | |
− | fi | + | if [ -r "$DEFAULT" ]; then |
− | + | . "$DEFAULT" | |
− | exit 0 | + | fi |
− | + | ||
+ | if [ "true" = "$ENABLED" ]; then | ||
+ | exec /usr/lib/sysstat/sa1 "$@" | ||
+ | fi | ||
+ | |||
+ | exit 0 | ||
== Related terms == | == Related terms == | ||
* <code>[[/etc/cron.d/sysstat]]</code> | * <code>[[/etc/cron.d/sysstat]]</code> | ||
− | + | * <code>[[command -v]]</code> | |
== See also == | == See also == |
Latest revision as of 09:16, 7 February 2023
/usr/lib/sysstat/debian-sa1
Ubuntu 22.04.1 LTS[edit]
#!/bin/sh # vim:ts=2:et # Debian sa1 helper which is run from cron.d job, not to needlessly # fill logs (see Bug#499461). set -e # Skip in favour of systemd timer [ ! -d /run/systemd/system ] || exit 0 # Our configuration file DEFAULT=/etc/default/sysstat # Default setting, overridden in the above file ENABLED=false # Read defaults file [ ! -r "$DEFAULT" ] || . "$DEFAULT" [ "$ENABLED" = "true" ] || exit 0 exec /usr/lib/sysstat/sa1 "$@"
Ubuntu[edit]
!/bin/sh # vim:ts=2:et # Debian sa1 helper which is run from cron.d job, not to needlessly # fill logs (see Bug#499461). set -e # Global variables: # # our configuration file DEFAULT=/etc/default/sysstat # default setting, overriden in the above file ENABLED=false # Read defaults file if [ -r "$DEFAULT" ]; then . "$DEFAULT" fi if [ "true" = "$ENABLED" ]; then exec /usr/lib/sysstat/sa1 "$@" fi exit 0
Related terms[edit]
See also[edit]
Advertising: