updated on Thu Jan 26 00:18:00 UTC 2012
[aur-mirror.git] / safekeep / safekeep.install
blobc1519140712503eb5ec590b5d3806efe31aff294
1 post_install() {
2   /usr/sbin/groupadd safekeep 2>/dev/null || true
3   /usr/sbin/useradd -s /bin/bash -g safekeep -d /var/lib/safekeep  -s /sbin/nologin \
4     -c "Used by SafeKeep to run and store backups." safekeep 2>/dev/null || true
7   if [ ! -d /var/lib/safekeep ]; then
8     mkdir /var/lib/safekeep
9   fi
10   chown -R safekeep:safekeep /var/lib/safekeep
12   cat << _EOF
14         NOTE: You will have to manually take care of a number of
15         steps such as installing the cron job script, creating the
16         safekeep user, and generating and deploying ssh keys on
17         the backup server machine.
19         To create a new user called "safekeep," issue:
20                 useradd -g users -m -d /var/lib/safekeep -s /sbin/nologin
21                         -c "Used by SafeKeep to run and store backups." safekeep 
23         To install the cron job script, issue:
24                 cp /usr/share/safekeep/safekeep.cron /etc/cron.daily/safekeep
25         
26         Please see the following link for a quick setup example:
27                 http://safekeep.sourceforge.net/documentation.shtml
29 _EOF
32 post_remove() {
33   /usr/sbin/userdel safekeep
34   /usr/sbin/groupdel safekeep
36   cat << _EOF
38         NOTE: You will have to manually take care of a number of
39         steps such as removing the cron job script, removing the
40         safekeep user, and removing ssh keys.
42         To remove the user called "safekeep," issue:
43                 userdel -r safekeep
45         To remove the cron job script, issue:
46                 rm /etc/cron.daily/safekeep
48 _EOF