This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# see https://nixos.org/manual/nix/stable/installation/upgrading.html | |
set -eu | |
if [ "$(id -u)" != 0 ]; then | |
script="$(basename "$0")" | |
>&2 echo "$script: root required, re-executing through sudo" | |
exec sudo --login "$0" | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# | |
# remove-rsyslog -- remove rsyslog and its log files | |
# | |
# As of Debian 10, rsyslog exists mainly for backwards compatibility reasons, | |
# and it is not required for the base system to operate. If you do not require | |
# this backwards compatibility, you can use this script to remove rsyslog and | |
# all of its redundant log files from your system. | |
# | |
systemctl disable --now rsyslog.service |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
# zswapstat -- convenience script for reporting zswap statistics | |
# see also: https://www.kernel.org/doc/html/latest/vm/zswap.html | |
use strict; | |
use warnings; | |
use constant ZSWAP_DEBUG_DIR => "/sys/kernel/debug/zswap"; | |
sub read_file { |