if warn:
print("WARNING! %s has only %s remaining" % (path, pp_size(free)))
+ return False
+
+ return True
def read_fstab():
for line in open("/etc/fstab"):
def main():
paths = set(["/"])
paths.update(read_fstab())
+ ok = True
for path in paths:
- check_path(path)
+ ok = ok and check_path(path)
+
+ if not ok:
+ sys.exit(1)
if __name__ == "__main__":
main()
--- /dev/null
+#!/bin/bash
+
+set -eu
+
+if [ -z "${CHRONIC_WRAPPED:-}" ]; then
+ export CHRONIC_WRAPPED=1
+ exec chronic -e "$0"
+fi
+
+. /etc/os-release
+
+function is_debian {
+ [ "$ID" = debian ] || [ "${ID_LIKE:-}" = debian ]
+}
+
+function is_arch {
+ [ "$ID" = arch ]
+}
+
+if is_debian; then
+ echo "# aptorphan"
+ aptorphan 1>&2
+
+ echo "# aptitude search ~U"
+ aptitude search ~U 1>&2
+fi
+
+if is_arch; then
+ echo "# pacorphan"
+ pacorphan 1>&2
+
+ echo "# checkupdates"
+ checkupdates 1>&2
+fi
--- /dev/null
+#!/bin/bash
+
+set -eu
+
+. /etc/os-release
+
+cd "$(dirname "$(readlink -f "$0")")"
+
+for i in ./*; do
+ if [ "$i" != "$(basename "$0")" ]; then
+ if ! "$i"; then
+ echo -e "\n^^ FAILED! $(hostname) $PRETTY_NAME -- $i ^^\n"
+ exit 1
+ fi
+ fi
+done
--- /dev/null
+#!/bin/bash
+
+if systemctl is-failed -q '*'; then
+ echo -e "# systemctl --failed"
+ systemctl --failed
+ exit 1
+else
+ exit 0
+fi