summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--network/freenx/config/freenx.logrotate3
-rw-r--r--network/freenx/freenx.SlackBuild11
2 files changed, 11 insertions, 3 deletions
diff --git a/network/freenx/config/freenx.logrotate b/network/freenx/config/freenx.logrotate
index 3342cc437c..b0f69d6fc0 100644
--- a/network/freenx/config/freenx.logrotate
+++ b/network/freenx/config/freenx.logrotate
@@ -1,8 +1,9 @@
-/var/log/nxserver.log {
+/var/log/nxserver/nxserver.log {
rotate 4
size=4M
notifempty
missingok
+ su nx root
sharedscripts
copytruncate
}
diff --git a/network/freenx/freenx.SlackBuild b/network/freenx/freenx.SlackBuild
index 5947a86f32..71a7a04d89 100644
--- a/network/freenx/freenx.SlackBuild
+++ b/network/freenx/freenx.SlackBuild
@@ -25,10 +25,12 @@
# * ported to SBo.
# 22/feb/2011 by Matteo Bernardini <ponce@slackbuilds.org>
# * setup server with nomachine key by default.
+# 11/sep/2012 by Matteo Bernardini <ponce@slackbuilds.org>
+# * moved log file and fixed logrotate script.
PRGNAM=freenx
VERSION=${VERSION:-0.7.3}
-BUILD=${BUILD:-2}
+BUILD=${BUILD:-3}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
@@ -116,12 +118,17 @@ install -m 0755 \
nxnode nxnode-login nxprint nxserver nxsetup nxviewer_helper \
$PKG/usr/bin
-install -m 0644 node.conf.sample $PKG/etc/nxserver
+sed \
+ -e "s|^\#NX_LOGFILE.*|NX_LOGFILE=/var/log/nxserver/nxserver.log|" \
+ -e "s|^\#COMMAND_MD5SUM=.*|COMMAND_MD5SUM=\"md5sum\"|" \
+ node.conf.sample > $PKG/etc/nxserver/node.conf.sample
cp -a $PKG/etc/nxserver/node.conf.{sample,new}
install -m 0755 init.d/freenx-server $PKG/etc/rc.d/rc.freenx.new
# Add a logrotate script:
install -m 644 $CWD/config/freenx.logrotate $PKG/etc/logrotate.d/freenx-server.new
+mkdir -p $PKG/var/log/nxserver
+chown nx:root $PKG/var/log/nxserver
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a $DOCS $PKG/usr/doc/$PRGNAM-$VERSION || true