source: npl/system/sysklogd/doinst.sh @ 105afb5

Last change on this file since 105afb5 was c5c522c, checked in by Edwin Eefting <edwin@datux.nl>, 8 years ago

initial commit, transferred from cleaned syn3 svn tree

  • Property mode set to 100644
File size: 822 bytes
Line 
1config() {
2  NEW="$1"
3  OLD="$(dirname $NEW)/$(basename $NEW .new)"
4  # If there's no config file by that name, mv it over:
5  if [ ! -r $OLD ]; then
6    mv $NEW $OLD
7  elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then # toss the redundant copy
8    rm $NEW
9  fi
10  # Otherwise, we leave the .new copy for the admin to consider...
11}
12config etc/logrotate.d/syslog.new
13config etc/syslog.conf.new
14rm etc/rc.d/rc.syslog
15config var/log/cron.new
16config var/log/debug.new
17config var/log/maillog.new
18config var/log/messages.new
19config var/log/secure.new
20config var/log/spooler.new
21config var/log/syslog.new
22
23# Remove any leftover empty files:
24rm -f var/log/cron.new
25rm -f var/log/debug.new
26rm -f var/log/maillog.new
27rm -f var/log/messages.new
28rm -f var/log/secure.new
29rm -f var/log/spooler.new
30rm -f var/log/syslog.new
31
Note: See TracBrowser for help on using the repository browser.