![]() ![]() |
hotsanic |
Subversion Repositories: |
Compare with Previous - Blame - Download
#!/usr/bin/env shif ! [ -e settings ]; then OUTFILE="settings"; else OUTFILE="settings.new"; ficat > $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#EOFif [ "$OUTFILE" = "settings.new" ]; thencat settings | grep "^APCACCESS=" >> $OUTFILEfiechoecho "Please check the settings file and adapt it to satisfy your needs."if [ "$OUTFILE" = "settings.new" ]; thenmkdir -p backupNOW=`date +%Y%m%d-%H%M%S`mv -f settings backup/settings-$NOWmv -f settings.new settingsecho "a backup of the previous settings has been saved."fiecho