31 lines
434 B
Bash
Executable file
31 lines
434 B
Bash
Executable file
#!/usr/bin/sh
|
|
|
|
alias get_priv="sudo"
|
|
if [ -x "$(command -v doas)" ]
|
|
then
|
|
alias get_priv="doas"
|
|
fi
|
|
|
|
get_priv echo
|
|
|
|
paru -Syu
|
|
|
|
if [ $? -eq 0 ]; then
|
|
echo "UPDATE SUCCEDEED"
|
|
else
|
|
echo "UPDATE FAILED"
|
|
exit 1
|
|
fi
|
|
|
|
|
|
echo "==================================================================="
|
|
|
|
|
|
get_priv checkservices
|
|
|
|
if [ $? -eq 0 ]; then
|
|
echo "CHECKSERVICES SUCCEDEED"
|
|
else
|
|
echo "CHECKSERVICES FAILED"
|
|
exit 1
|
|
fi
|