Remove manual page

Tests for presence of pihole man page.
If it is present, deletes it and runs man-db to rebuild manual database.

Signed-off-by: Rob Gill <rrobgill@protonmail.com>
This commit is contained in:
Rob Gill 2018-06-02 09:50:52 +10:00 committed by GitHub
parent a8103ca22d
commit 999e47a26c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -171,6 +171,13 @@ removeNoPurge() {
echo -e "${OVER} ${TICK} Removed pihole-FTL" echo -e "${OVER} ${TICK} Removed pihole-FTL"
fi fi
# If the pihole manpage exists, then delete and rebuild man-db
if [[ -f /usr/local/share/man/man8/pihole.8 ]]; then
${SUDO} rm -f /usr/local/share/man/man8/pihole.8
${SUDO} mandb -q &>/dev/null
echo -e " ${TICK} Removed pihole man page"
fi
# If the pihole user exists, then remove # If the pihole user exists, then remove
if id "pihole" &> /dev/null; then if id "pihole" &> /dev/null; then
if ${SUDO} userdel -r pihole 2> /dev/null; then if ${SUDO} userdel -r pihole 2> /dev/null; then