aboutsummaryrefslogtreecommitdiff
path: root/buildtools/freebsd-skeleton/rpki-rp
diff options
context:
space:
mode:
authorRob Austein <sra@hactrn.net>2013-05-02 21:56:22 +0000
committerRob Austein <sra@hactrn.net>2013-05-02 21:56:22 +0000
commit9cb3bdabce76e0e9e0947a8795ff1d121c773c51 (patch)
tree98f90f7b494bfa1218705e23fe7a1628b4cbe4e0 /buildtools/freebsd-skeleton/rpki-rp
parent42ef937519bf4e64e1d1bc812c70fdaa6e88bcf1 (diff)
Move all the @exec and @unexec stuff to pkg-install and pkg-deinstall. See #526.
svn path=/trunk/; revision=5317
Diffstat (limited to 'buildtools/freebsd-skeleton/rpki-rp')
-rw-r--r--buildtools/freebsd-skeleton/rpki-rp/pkg-deinstall3
-rw-r--r--buildtools/freebsd-skeleton/rpki-rp/pkg-install13
2 files changed, 16 insertions, 0 deletions
diff --git a/buildtools/freebsd-skeleton/rpki-rp/pkg-deinstall b/buildtools/freebsd-skeleton/rpki-rp/pkg-deinstall
index 2e87170b..31beff95 100644
--- a/buildtools/freebsd-skeleton/rpki-rp/pkg-deinstall
+++ b/buildtools/freebsd-skeleton/rpki-rp/pkg-deinstall
@@ -3,6 +3,9 @@
case $2 in
DEINSTALL)
+ if cmp -s /usr/local/etc/rcynic.conf.sample /usr/local/etc/rcynic.conf; then
+ rm -f /usr/local/etc/rcynic.conf
+ fi
echo "Whacking rcynic's crontab"
/usr/bin/crontab -l -u rcynic 2>/dev/null |
/usr/bin/awk '
diff --git a/buildtools/freebsd-skeleton/rpki-rp/pkg-install b/buildtools/freebsd-skeleton/rpki-rp/pkg-install
index 820e4db3..aaf48c3c 100644
--- a/buildtools/freebsd-skeleton/rpki-rp/pkg-install
+++ b/buildtools/freebsd-skeleton/rpki-rp/pkg-install
@@ -24,6 +24,19 @@ PRE-INSTALL)
;;
POST-INSTALL)
+ if ! test -d /var/rcynic; then
+ echo "Creating /var/rcynic"
+ install -o root -g wheel -d /var/rcynic
+ fi
+ for dir in /var/rcynic/data /var/rcynic/rpki-rtr; do
+ if ! test -d $dir; then
+ echo "Creating $dir"
+ install -o rcynic -g rcynic -d /var/rcynic
+ fi
+ done
+ if test ! -f /usr/local/etc/rcynic.conf; then
+ cp -p /usr/local/etc/rcynic.conf.sample /usr/local/etc/rcynic.conf
+ fi
htmldir=/usr/local/www/apache22/data/rcynic
if ! test -d $htmldir ; then
echo "Creating $htmldir"