diff options
author | Matteo Bernardini <ponce@slackbuilds.org> | 2012-09-11 19:18:26 +0200 |
---|---|---|
committer | Matteo Bernardini <ponce@slackbuilds.org> | 2012-09-11 19:19:30 +0200 |
commit | 12e62e346d1a23ffd6f0f449d0fd5e871b59769b (patch) | |
tree | 0120fb9c271f63a109979e54566280bed45083e1 | |
parent | 7cd3963d4e19c0c1033e673fa2255bbd8fc2e888 (diff) | |
download | slackbuilds-12e62e346d1a23ffd6f0f449d0fd5e871b59769b.tar.gz |
network/freenx: Moved log file and fixed logrotate script.
Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org>
-rw-r--r-- | network/freenx/config/freenx.logrotate | 3 | ||||
-rw-r--r-- | network/freenx/freenx.SlackBuild | 11 |
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 |