1
0
mirror of https://github.com/Oxalide/vsphere-influxdb-go.git synced 2023-10-10 13:36:51 +02:00
vsphere-influxdb-go/vendor/github.com/influxdata/influxdb/scripts/pre-install.sh
2017-10-25 20:52:40 +00:00

17 lines
631 B
Bash
Executable File

#!/bin/bash
if [[ -d /etc/opt/influxdb ]]; then
# Legacy configuration found
if [[ ! -d /etc/influxdb ]]; then
# New configuration does not exist, move legacy configuration to new location
echo -e "Please note, InfluxDB's configuration is now located at '/etc/influxdb' (previously '/etc/opt/influxdb')."
mv -vn /etc/opt/influxdb /etc/influxdb
if [[ -f /etc/influxdb/influxdb.conf ]]; then
backup_name="influxdb.conf.$(date +%s).backup"
echo "A backup of your current configuration can be found at: /etc/influxdb/$backup_name"
cp -a /etc/influxdb/influxdb.conf /etc/influxdb/$backup_name
fi
fi
fi