jablonka.czprosek.czf

hotsanic

Subversion Repositories:
[/] [trunk/] [modules/] [apcusv/] [setup] - Rev 28 Go to most recent revision

Compare with Previous - Blame - Download


#!/usr/bin/env sh

if ! [ -e settings ]; then OUTFILE="settings"; else OUTFILE="settings.new"; fi

cat > $OUTFILE << EOF
# define path to the apc access tool including the cmdline option
# to retrieve the status protocol
#
# Example:
#   APCACCESS=/usr/local/bin/apcaccess status
#
EOF

if [ "$OUTFILE" = "settings.new" ]; then
  cat settings | grep "^APCACCESS=" >> $OUTFILE
  fi

echo
echo "Please check the settings file and adapt it to satisfy your needs."
if [ "$OUTFILE" = "settings.new" ]; then
  mkdir -p backup
  NOW=`date +%Y%m%d-%H%M%S`
  mv -f settings backup/settings-$NOW
  mv -f settings.new settings
  echo "a backup of the previous settings has been saved."
  fi
echo


Powered by WebSVN 2.2.1