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 | |
# https://gist.github.com/rverst/1f0b97da3cbeb7d93f4986df6e8e5695 | |
function chsv_check_version() { | |
if [[ $1 =~ ^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)(-((0|[1-9][0-9]*|[0-9]*[a-zA-Z-][0-9a-zA-Z-]*)(\.(0|[1-9][0-9]*|[0-9]*[a-zA-Z-][0-9a-zA-Z-]*))*))?(\+([0-9a-zA-Z-]+(\.[0-9a-zA-Z-]+)*))?$ ]]; then | |
echo "$1" | |
else | |
echo "" | |
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
! uMatrix: rverst custom ruleset recipes 1.0 | |
! Title: Custom ruleset | |
! Maintainer: rverst | |
chayns | |
chayns.net * | |
_ 1st-party script | |
_ chayns-static.space * | |
_ tobit.com * | |
_ tsimg.cloud * |
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 sh | |
is_root () { [ "$(id -u)" -eq 0 ]; } | |
is_docker_grp() { [ -n "$(id -Gn | grep docker)" ]; } | |
if ! is_root && ! is_docker_grp; then | |
echo "You need to be 'root' or in the 'docker'-group!" | |
echo "Try 'sudo docker_cleanup.sh'" | |
exit 1 | |
fi |