Change installScripts to use install

Use the install program instead of copying files and directories in installScripts function.
This commit is contained in:
Dan Schaper 2016-10-05 09:42:15 -07:00 committed by GitHub
parent ca0cbd68d6
commit 5382b4fa37

View file

@ -526,11 +526,8 @@ installScripts() {
# Install the scripts from /etc/.pihole to their various locations # Install the scripts from /etc/.pihole to their various locations
${SUDO} echo ":::" ${SUDO} echo ":::"
${SUDO} echo -n "::: Installing scripts to /opt/pihole..." ${SUDO} echo -n "::: Installing scripts to /opt/pihole..."
if [ ! -d /opt/pihole ]; then ${SUDO} install -o ${USER} -m755 -d /opt/pihole
${SUDO} mkdir /opt/pihole
${SUDO} chown "$USER":root /opt/pihole
${SUDO} chmod u+srwx /opt/pihole
fi
${SUDO} cp /etc/.pihole/gravity.sh /opt/pihole/gravity.sh ${SUDO} cp /etc/.pihole/gravity.sh /opt/pihole/gravity.sh
${SUDO} cp /etc/.pihole/advanced/Scripts/chronometer.sh /opt/pihole/chronometer.sh ${SUDO} cp /etc/.pihole/advanced/Scripts/chronometer.sh /opt/pihole/chronometer.sh
${SUDO} cp /etc/.pihole/advanced/Scripts/whitelist.sh /opt/pihole/whitelist.sh ${SUDO} cp /etc/.pihole/advanced/Scripts/whitelist.sh /opt/pihole/whitelist.sh