bin: function adjustments
This commit is contained in:
parent
8f4fda1a1f
commit
c825980c29
|
@ -245,7 +245,7 @@ del() {
|
|||
|
||||
u() {
|
||||
# Line below handy for users of netkeeper
|
||||
ping example.com -c 1 -w 2 >/dev/null && sudo nft list ruleset | grep -1 outall | grep -q 'meta hour' || echo sysupgrade | netkeeper 30 2>/dev/null
|
||||
timeout 1 curl -s https://github.com >/dev/null || echo "Suspending netkeeper" >&2 | echo sysupgrade | netkeeper 30 2>/dev/null
|
||||
if command -v pacman >/dev/null; then
|
||||
if test "$(stat /etc/pacman.d/mirrorlist --printf=%y | cut -d'-' -f1-2)" != "$(date +%Y-%m)"
|
||||
then
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
#!/bin/bash
|
||||
# Clean up files according to given parameters
|
||||
# TODO filter recently accessed files
|
||||
|
||||
typeset -A _clean_map
|
||||
_clean_map=([h]=$XDG_CACHE_HOME [t]=/var/tmp [l]=/var/log [v]=/var/cache)
|
||||
|
|
|
@ -34,6 +34,7 @@ case "$sel" in
|
|||
(/etc/ssh/*) sudoedit "$sel" && sudo systemctl reload-or-restart sshd;;
|
||||
(/etc/network/interfaces*) sudoedit "$sel" && sudo service networking reload;;
|
||||
(/etc/samba/smb.conf) sudoedit "$sel" && testparm;;
|
||||
(/etc/nftables.conf) sudoedit "$sel" && sudo systemctl restart nftables;;
|
||||
(*) edit "$sel";;
|
||||
esac
|
||||
echo "$sel" | cat - "$conf_cache" | head -20 >"$conf_tmp" && mv "$conf_tmp" "$conf_cache"
|
||||
|
|
Loading…
Reference in New Issue