path: root/system/ZoneMinder/
blob: 45b15510f2c48c5a34dbe75e5b52899a821004eb (plain)
config() {
  OLD="$(dirname $NEW)/$(basename $NEW .new)"
  # If there's no config file by that name, mv it over:
  if [ ! -r $OLD ]; then
    mv $NEW $OLD
  elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then
    # toss the redundant copy
    rm $NEW
  # Otherwise, we leave the .new copy for the admin to consider...

# Keep same perms on
if [ -e etc/rc.d/ ]; then
  cp -a etc/rc.d/ etc/rc.d/
  cat etc/rc.d/ > etc/rc.d/
  mv etc/rc.d/ etc/rc.d/

config etc/rc.d/
config etc/zm/
config etc/zm/
config etc/logrotate.d/

echo ""
echo "   If this is a new installation, you will need to create a MySQL database"
echo "   for ZoneMinder to use. See /usr/doc/ZoneMinder-<version>/README.SLACKWARE" 
echo ""
echo "   If you are upgrading, you will need to run the script:"
echo "   /usr/bin/ version=<from version> [--user=<my_database_user> --pass=<my_database_pass>]"
echo ""