Skip to content

Commit

Permalink
Debian: Clean up /etc/rsbackup on purge
Browse files Browse the repository at this point in the history
  • Loading branch information
ewxrjk committed Dec 16, 2014
1 parent 045176b commit b1283ba
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 0 deletions.
1 change: 1 addition & 0 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ EXTRA_DIST=scripts/txt2src scripts/htmlman scripts/dist \
debian/changelog debian/control debian/copyright \
debian/doc.rsbackup \
debian/rsbackup.conffiles debian/rsbackup.postinst debian/rules \
debian/rsbackup.postrm \
README.md

echo-distdir:
Expand Down
22 changes: 22 additions & 0 deletions debian/rsbackup.postrm
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#! /bin/sh
# Copyright © 2014 Richard Kettlewell.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
set -e
case "$1" in
purge )
rm -f /etc/rsbackup/local
rmdir --ignore-fail-on-non-empty /etc/rsbackup
;;
esac
1 change: 1 addition & 0 deletions debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ binary-${PACKAGE}: build
mkdir -p debian/${PACKAGE}/usr/share/doc-base
cp debian/${PACKAGE}.conffiles debian/${PACKAGE}/DEBIAN/conffiles
cp debian/${PACKAGE}.postinst debian/${PACKAGE}/DEBIAN/postinst
cp debian/${PACKAGE}.postrm debian/${PACKAGE}/DEBIAN/postrm
cp tools/rsbackup.hourly debian/${PACKAGE}/etc/cron.hourly/rsbackup
cp tools/rsbackup.daily debian/${PACKAGE}/etc/cron.daily/rsbackup
cp tools/rsbackup.weekly debian/${PACKAGE}/etc/cron.weekly/rsbackup
Expand Down

0 comments on commit b1283ba

Please sign in to comment.