Remove sudo from status echos

This commit is contained in:
Dan Schaper 2016-10-07 14:45:54 -07:00
parent 6a28070017
commit 488a32e7a5

View file

@ -690,23 +690,23 @@ update_repo() {
CreateLogFile() { CreateLogFile() {
# Create logfiles if necessary # Create logfiles if necessary
echo ":::" echo ":::"
${SUDO} echo -n "::: Creating log file and changing owner to dnsmasq..." echo -n "::: Creating log file and changing owner to dnsmasq..."
if [ ! -f /var/log/pihole.log ]; then if [ ! -f /var/log/pihole.log ]; then
${SUDO} touch /var/log/pihole.log ${SUDO} touch /var/log/pihole.log
${SUDO} chmod 644 /var/log/pihole.log ${SUDO} chmod 644 /var/log/pihole.log
${SUDO} chown dnsmasq:root /var/log/pihole.log ${SUDO} chown dnsmasq:root /var/log/pihole.log
${SUDO} echo " done!" echo " done!"
else else
${SUDO} echo " already exists!" echo " already exists!"
fi fi
} }
installPiholeWeb() { installPiholeWeb() {
# Install the web interface # Install the web interface
${SUDO} echo ":::" echo ":::"
${SUDO} echo -n "::: Installing pihole custom index page..." echo -n "::: Installing pihole custom index page..."
if [ -d "/var/www/html/pihole" ]; then if [ -d "/var/www/html/pihole" ]; then
${SUDO} echo " Existing page detected, not overwriting" echo " Existing page detected, not overwriting"
else else
${SUDO} mkdir /var/www/html/pihole ${SUDO} mkdir /var/www/html/pihole
if [ -f /var/www/html/index.lighttpd.html ]; then if [ -f /var/www/html/index.lighttpd.html ]; then
@ -715,7 +715,7 @@ installPiholeWeb() {
printf "\n:::\tNo default index.lighttpd.html file found... not backing up" printf "\n:::\tNo default index.lighttpd.html file found... not backing up"
fi fi
${SUDO} cp /etc/.pihole/advanced/index.* /var/www/html/pihole/. ${SUDO} cp /etc/.pihole/advanced/index.* /var/www/html/pihole/.
${SUDO} echo " done!" echo " done!"
fi fi
# Install Sudoer file # Install Sudoer file
echo -n "::: Installing sudoer file..." echo -n "::: Installing sudoer file..."
@ -727,16 +727,16 @@ installPiholeWeb() {
installCron() { installCron() {
# Install the cron job # Install the cron job
${SUDO} echo ":::" echo ":::"
${SUDO} echo -n "::: Installing latest Cron script..." echo -n "::: Installing latest Cron script..."
${SUDO} cp /etc/.pihole/advanced/pihole.cron /etc/cron.d/pihole ${SUDO} cp /etc/.pihole/advanced/pihole.cron /etc/cron.d/pihole
${SUDO} echo " done!" echo " done!"
} }
runGravity() { runGravity() {
# Rub gravity.sh to build blacklists # Rub gravity.sh to build blacklists
${SUDO} echo ":::" echo ":::"
${SUDO} echo "::: Preparing to run gravity.sh to refresh hosts..." echo "::: Preparing to run gravity.sh to refresh hosts..."
if ls /etc/pihole/list* 1> /dev/null 2>&1; then if ls /etc/pihole/list* 1> /dev/null 2>&1; then
echo "::: Cleaning up previous install (preserving whitelist/blacklist)" echo "::: Cleaning up previous install (preserving whitelist/blacklist)"
${SUDO} rm /etc/pihole/list.* ${SUDO} rm /etc/pihole/list.*