summaryrefslogtreecommitdiffstats
path: root/network/etherpad-lite/etherpad-lite.SlackBuild
diff options
context:
space:
mode:
author Robby Workman <rworkman@slackbuilds.org>2013-02-23 23:22:36 -0600
committer Robby Workman <rworkman@slackbuilds.org>2013-02-24 13:25:01 -0600
commitb2b78b8bc2b60d1db146e5a814317079ea7a1ef6 (patch)
tree49c41e8df69117c0835210cbae0947b99ce1d16a /network/etherpad-lite/etherpad-lite.SlackBuild
parent196f57a4114b8966d69c22d25914af25146f1a5d (diff)
downloadslackbuilds-b2b78b8bc2b60d1db146e5a814317079ea7a1ef6.tar.gz
slackbuilds-b2b78b8bc2b60d1db146e5a814317079ea7a1ef6.tar.xz
network/etherpad-lite: Don't clobber system configs/logs on upgrade
This commit creates if needed (otherwise, updates timestamps on) the log files during package install as opposed to creating them inside the package itself - if they're present inside the package, then a package upgrade clobbers the files on the installed system if they happen to already exist. This commit also installs the init script and a couple of config files with .new extensions and then does the config() routine on them (or preserve_perms() in the case of the init script). The downside is that this will cause any .new'd files *and* the logs to be removed on this upgrade; I hope this doesn't cause much pain for users, but it's got to happen sooner or later, so let's get it over with... Signed-off-by: Robby Workman <rworkman@slackbuilds.org>
Diffstat (limited to 'network/etherpad-lite/etherpad-lite.SlackBuild')
-rw-r--r--network/etherpad-lite/etherpad-lite.SlackBuild9
1 files changed, 4 insertions, 5 deletions
diff --git a/network/etherpad-lite/etherpad-lite.SlackBuild b/network/etherpad-lite/etherpad-lite.SlackBuild
index 27a25c8609..6fb8cca94c 100644
--- a/network/etherpad-lite/etherpad-lite.SlackBuild
+++ b/network/etherpad-lite/etherpad-lite.SlackBuild
@@ -63,14 +63,12 @@ cp -a * $PKG/var/$PRGNAM
chown -R $ETHERPAD_USER:$ETHERPAD_GROUP $PKG/var/$PRGNAM
mkdir -p $PKG/var/log/$PRGNAM
-touch $PKG/var/log/$PRGNAM/etherpad.log
-touch $PKG/var/log/$PRGNAM/error.log
-chown -R $ETHERPAD_USER:$ETHERPAD_GROUP $PKG/var/log/$PRGNAM
+chown $ETHERPAD_USER:$ETHERPAD_GROUP $PKG/var/log/$PRGNAM
mkdir -p $PKG/etc/rc.d $PKG/etc/$PRGNAM
-install -D -m 0755 $CWD/rc.etherpad-lite $PKG/etc/rc.d/rc.etherpad-lite
+install -D -m 0755 $CWD/rc.etherpad-lite $PKG/etc/rc.d/rc.etherpad-lite.new
cat settings.json.template > $PKG/etc/$PRGNAM/settings.json.template
-cat settings.json.template > $PKG/etc/$PRGNAM/settings.json
+cat settings.json.template > $PKG/etc/$PRGNAM/settings.json.new
mkdir -p $PKG/srv
ln -sf /var/$PRGNAM $PKG/srv/$PRGNAM
@@ -82,6 +80,7 @@ cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
+cat $CWD/doinst.sh > $PKG/install/doinst.sh
cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}