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
# If it isn't, exit because the install cannot complete
if [[ $(dpkg-query -s sudo) ]];then
echo "::: Running sudo -u pihole $@"
sudo -u pihole "$@"
echo "::: Running sudo -u pihole $0 $@"
sudo -u pihole "$0" "$@"
exit $?
else
echo "::: Please install sudo."

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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