diff options
author | ramon <ramongomez@us.es> | 2011-07-04 11:51:52 +0000 |
---|---|---|
committer | ramon <ramongomez@us.es> | 2011-07-04 11:51:52 +0000 |
commit | 700299bbc824fa9026f215dca94935406321c11d (patch) | |
tree | fa5a50bf373273ef5269e1c6e139e8c3886b425c | |
parent | 04d84320d566ec78b4adfb243fc37842973d689f (diff) |
VersiĆ³n 1.0.2: instalador configura logrotate desde la plantilla predefinida (cerrar #425)
git-svn-id: https://opengnsys.es/svn/branches/version1.0@2125 a21b9725-9963-47de-94b9-378ad31fedc9
-rwxr-xr-x | installer/opengnsys_installer.sh | 4 | ||||
-rwxr-xr-x | installer/opengnsys_installer_v1.0.2.sh | 6 | ||||
-rw-r--r-- | server/etc/logrotate.tmpl | 6 |
3 files changed, 12 insertions, 4 deletions
diff --git a/installer/opengnsys_installer.sh b/installer/opengnsys_installer.sh index 19e9b890..aede6399 100755 --- a/installer/opengnsys_installer.sh +++ b/installer/opengnsys_installer.sh @@ -1060,6 +1060,10 @@ function openGnsysConfigure() echo "* * * * * root [ -x $INSTALL_TARGET/bin/torrent-creator ] && $INSTALL_TARGET/bin/torrent-creator" > /etc/cron.d/torrentcreator echo "5 * * * * root [ -x $INSTALL_TARGET/bin/torrent-tracker ] && $INSTALL_TARGET/bin/torrent-tracker" > /etc/cron.d/torrenttracker + echoAndLog "${FUNCNAME}(): Creating logrotate configuration file." + sed -e "s/OPENGNSYSDIR/${INSTALL_TARGET//\//\\/}/g" \ + $WORKDIR/opengnsys/server/etc/logrotate.tmpl > /etc/logrotate.d/opengnsys + echoAndLog "${FUNCNAME}(): Creating OpenGnSys config files." for dev in ${DEVICE[*]}; do if [ -n "${SERVERIP[i]}" ]; then diff --git a/installer/opengnsys_installer_v1.0.2.sh b/installer/opengnsys_installer_v1.0.2.sh index 7d6a0374..c09798f0 100755 --- a/installer/opengnsys_installer_v1.0.2.sh +++ b/installer/opengnsys_installer_v1.0.2.sh @@ -743,7 +743,7 @@ function smbConfigure() backupFile $SAMBACFGDIR/smb.conf # Copiar plantailla de recursos para OpenGnSys - sed -e "s/OPENGNSYSDIR/${INSTALL_TARGET//\//\\/}/g" \ + sed -e "s/OPENGNSYSDIR/${INSTALL_TARGET//\//\\/}/g" \ $WORKDIR/opengnsys/server/etc/smb-og.conf.tmpl > $SAMBACFGDIR/smb-og.conf # Configurar y recargar Samba" perl -pi -e "s/WORKGROUP/OPENGNSYS/; s/server string \=.*/server string \= OpenGnSys Samba Server/; s/^\; *include \=.*$/ include \= \/etc\/samba\/smb-og.conf/" $SAMBACFGDIR/smb.conf @@ -1134,6 +1134,10 @@ function openGnsysConfigure() echo "* * * * * root [ -x $INSTALL_TARGET/bin/torrent-creator ] && $INSTALL_TARGET/bin/torrent-creator" > /etc/cron.d/torrentcreator echo "5 * * * * root [ -x $INSTALL_TARGET/bin/torrent-tracker ] && $INSTALL_TARGET/bin/torrent-tracker" > /etc/cron.d/torrenttracker + echoAndLog "${FUNCNAME}(): Creating logrotate configuration file." + sed -e "s/OPENGNSYSDIR/${INSTALL_TARGET//\//\\/}/g" \ + $WORKDIR/opengnsys/server/etc/logrotate.tmpl > /etc/logrotate.d/opengnsys + echoAndLog "${FUNCNAME}(): Creating OpenGnSys config files." for dev in ${DEVICE[*]}; do if [ -n "${SERVERIP[i]}" ]; then diff --git a/server/etc/logrotate.tmpl b/server/etc/logrotate.tmpl index 0ed3259c..d68184be 100644 --- a/server/etc/logrotate.tmpl +++ b/server/etc/logrotate.tmpl @@ -7,17 +7,17 @@ copytruncate compress -/opt/opengnsys/log/clients/*.log { +OPENGNSYSDIR/log/clients/*.log { rotate 5 size 100k } -/opt/opengnsys/log/mcastlog/ogAdmRepoMcast.* { +OPENGNSYSDIR/log/mcastlog/ogAdmRepoMcast.* { rotate 2 weekly } -/opt/opengnsys/log/bttrack.log /opt/opengnsys/log/ogAdmRepo.log /opt/opengnsys/log/ogAdmServer.log { +OPENGNSYSDIR/log/bttrack.log OPENGNSYSDIR/log/ogAdmRepo.log OPENGNSYSDIR/log/ogAdmServer.log { rotate 4 weekly } |