Merge branches 'development' and 'feature/track_pre-installed_packages' of github.com:pi-hole/pi-hole into feature/track_pre-installed_packages

pull/1008/head
Dan Schaper 8 years ago
commit e7c944ff0b
No known key found for this signature in database
GPG Key ID: 572E999E385B7BFC

@ -9,4 +9,3 @@
# the Free Software Foundation, either version 2 of the License, or # the Free Software Foundation, either version 2 of the License, or
# (at your option) any later version. # (at your option) any later version.
www-data ALL=NOPASSWD: /usr/local/bin/pihole

@ -130,8 +130,8 @@ fi
is_repo() { is_repo() {
# Use git to check if directory is currently under VCS, return the value # Use git to check if directory is currently under VCS, return the value
local directory="${1}" local directory="${1}"
git -C "${directory}" status --short &> /dev/null curdir=$PWD; cd $directory; git status --short &> /dev/null; rc=$?; cd $curdir
return return $rc
} }
make_repo() { make_repo() {
@ -623,6 +623,7 @@ installScripts() {
# Install files from local core repository # Install files from local core repository
if is_repo "${PI_HOLE_LOCAL_REPO}"; then if is_repo "${PI_HOLE_LOCAL_REPO}"; then
cd "${PI_HOLE_LOCAL_REPO}" cd "${PI_HOLE_LOCAL_REPO}"
install -o "${USER}" -Dm755 -d /opt/pihole
install -o "${USER}" -Dm755 -t /opt/pihole/ gravity.sh install -o "${USER}" -Dm755 -t /opt/pihole/ gravity.sh
install -o "${USER}" -Dm755 -t /opt/pihole/ ./advanced/Scripts/*.sh install -o "${USER}" -Dm755 -t /opt/pihole/ ./advanced/Scripts/*.sh
install -o "${USER}" -Dm755 -t /opt/pihole/ ./automated\ install/uninstall.sh install -o "${USER}" -Dm755 -t /opt/pihole/ ./automated\ install/uninstall.sh
@ -818,6 +819,8 @@ installPiholeWeb() {
echo -n "::: Installing sudoer file..." echo -n "::: Installing sudoer file..."
mkdir -p /etc/sudoers.d/ mkdir -p /etc/sudoers.d/
cp /etc/.pihole/advanced/pihole.sudo /etc/sudoers.d/pihole cp /etc/.pihole/advanced/pihole.sudo /etc/sudoers.d/pihole
# Add lighttpd user (OS dependent) to sudoers file
echo "${LIGHTTPD_USER} ALL=NOPASSWD: /usr/local/bin/pihole" >> /etc/sudoers.d/pihole
chmod 0440 /etc/sudoers.d/pihole chmod 0440 /etc/sudoers.d/pihole
echo " done!" echo " done!"
} }
@ -839,7 +842,7 @@ runGravity() {
rm /etc/pihole/list.* rm /etc/pihole/list.*
fi fi
echo "::: Running gravity.sh" echo "::: Running gravity.sh"
/opt/pihole/gravity.sh { /opt/pihole/gravity.sh; }
} }
create_pihole_user() { create_pihole_user() {

Loading…
Cancel
Save