jablonka.czprosek.czf

hotsanic

Subversion Repositories:
[/] [trunk/] [modules/] [apcusv/] [setup] - Blame information for rev 21

 

Line No. Rev Author Line
110simandl#!/usr/bin/env sh
2 
3if ! [ -e settings ]; then OUTFILE="settings"; else OUTFILE="settings.new"; fi
4 
5cat > $OUTFILE << EOF
6# define path to the apc access tool including the cmdline option
7# to retrieve the status protocol
8#
9# Example:
10# APCACCESS=/usr/local/bin/apcaccess status
11#
12EOF
13 
14if [ "$OUTFILE" = "settings.new" ]; then
15 cat settings | grep "^APCACCESS=" >> $OUTFILE
16 fi
17 
18echo
19echo "Please check the settings file and adapt it to satisfy your needs."
20if [ "$OUTFILE" = "settings.new" ]; then
21 mkdir -p backup
22 NOW=`date +%Y%m%d-%H%M%S`
23 mv -f settings backup/settings-$NOW
24 mv -f settings.new settings
25 echo "a backup of the previous settings has been saved."
26 fi
27echo
28 

Powered by WebSVN 2.2.1