addet plugin telesnip and some other changes

This commit is contained in:
pika 2024-08-19 22:50:08 +02:00
parent 84adb02beb
commit ad33734063
9 changed files with 258 additions and 161 deletions

View file

@ -0,0 +1,15 @@
# Check if the user is root and set sudo variable if necessary
check_root() {
if [[ "${EUID}" -ne 0 ]]; then
if command_exists sudo; then
echo_binfo "User is not root. Using sudo for privileged operations."
_sudo="sudo"
else
echo_error "No sudo found and you're not root! Can't install packages."
return 1
fi
else
echo_binfo "Root access confirmed."
_sudo=""
fi
}