Fixed missing "$0" in sudos

This commit is contained in:
ryt51V 2016-03-02 21:17:08 +00:00
parent 0079aa6f3e
commit 8d1c1e2b06
7 changed files with 14 additions and 14 deletions

View file

@ -37,8 +37,8 @@ else
# Check if it is actually installed # Check if it is actually installed
# If it isn't, exit because the install cannot complete # If it isn't, exit because the install cannot complete
if [[ $(dpkg-query -s sudo) ]];then if [[ $(dpkg-query -s sudo) ]];then
echo "::: Running sudo -u pihole $@" echo "::: Running sudo -u pihole $0 $@"
sudo -u pihole "$@" sudo -u pihole "$0" "$@"
exit $? exit $?
else else
echo "::: Please install sudo." echo "::: Please install sudo."

View file

@ -24,8 +24,8 @@ else
# Check if it is actually installed # Check if it is actually installed
# If it isn't, exit because the install cannot complete # If it isn't, exit because the install cannot complete
if [[ $(dpkg-query -s sudo) ]];then if [[ $(dpkg-query -s sudo) ]];then
echo "::: Running sudo -u pihole $@" echo "::: Running sudo -u pihole $0 $@"
sudo -u pihole "$@" sudo -u pihole "$0" "$@"
exit $? exit $?
else else
echo "::: Please install sudo." echo "::: Please install sudo."

View file

@ -24,8 +24,8 @@ else
# Check if it is actually installed # Check if it is actually installed
# If it isn't, exit because the install cannot complete # If it isn't, exit because the install cannot complete
if [[ $(dpkg-query -s sudo) ]];then if [[ $(dpkg-query -s sudo) ]];then
echo "::: Running sudo -u pihole $@" echo "::: Running sudo -u pihole $0 $@"
sudo -u pihole "$@" sudo -u pihole "$0" "$@"
exit $? exit $?
else else
echo "::: Please install sudo." echo "::: Please install sudo."

View file

@ -23,8 +23,8 @@ else
# Check if it is actually installed # Check if it is actually installed
# If it isn't, exit because the install cannot complete # If it isn't, exit because the install cannot complete
if [[ $(dpkg-query -s sudo) ]];then if [[ $(dpkg-query -s sudo) ]];then
echo "::: Running sudo $@" echo "::: Running sudo $0 $@"
sudo "$@" sudo "$0" "$@"
exit $? exit $?
else else
echo "::: Please install sudo or run this script as root." echo "::: Please install sudo or run this script as root."

View file

@ -23,8 +23,8 @@ else
# Check if it is actually installed # Check if it is actually installed
# If it isn't, exit because the install cannot complete # If it isn't, exit because the install cannot complete
if [[ $(dpkg-query -s sudo) ]];then if [[ $(dpkg-query -s sudo) ]];then
echo "::: Running sudo $@" echo "::: Running sudo $0 $@"
sudo "$@" sudo "$0" "$@"
exit $? exit $?
else else
echo "::: Please install sudo or run this script as root." echo "::: Please install sudo or run this script as root."

View file

@ -23,8 +23,8 @@ else
# Check if it is actually installed # Check if it is actually installed
# If it isn't, exit because the install cannot complete # If it isn't, exit because the install cannot complete
if [[ $(dpkg-query -s sudo) ]];then if [[ $(dpkg-query -s sudo) ]];then
echo "::: Running sudo $@" echo "::: Running sudo $0 $@"
sudo "$@" sudo "$0" "$@"
exit $? exit $?
else else
echo "::: Please install sudo or run this script as root." echo "::: Please install sudo or run this script as root."

View file

@ -37,8 +37,8 @@ else
# Check if it is actually installed # Check if it is actually installed
# If it isn't, exit because the install cannot complete # If it isn't, exit because the install cannot complete
if [[ $(dpkg-query -s sudo) ]];then if [[ $(dpkg-query -s sudo) ]];then
echo "::: Running sudo -u pihole $@" echo "::: Running sudo -u pihole $0 $@"
sudo -u pihole "$@" sudo -u pihole "$0" "$@"
exit $? exit $?
else else
echo "::: Please install sudo." echo "::: Please install sudo."