diff --git a/share/updateall/scripts.d/apt b/share/updateall/scripts.d/apt index 15b71d2..ea78057 100755 --- a/share/updateall/scripts.d/apt +++ b/share/updateall/scripts.d/apt @@ -1,5 +1,6 @@ #!/bin/sh -sudo apt-get update -sudo apt-get upgrade -sudo apt-get autoremove +[ "$USER" != root ] && exec sudo "$0" "$@" +apt-get update +apt-get upgrade +apt-get autoremove diff --git a/share/updateall/scripts.d/docker b/share/updateall/scripts.d/docker index ca047a9..12ac4aa 100755 --- a/share/updateall/scripts.d/docker +++ b/share/updateall/scripts.d/docker @@ -1,3 +1,4 @@ #!/bin/sh -sudo docker images --format '{{.Repository}}' | xargs -L 1 sudo docker pull +[ "$USER" != root ] && exec "$0" "$@" +docker images --format '{{.Repository}}' | xargs -L 1 docker pull