Merge pull request #45 from SteveClement/master

- Added conditional if config file has changed
pull/54/head
Steve Clement 2018-03-16 00:19:38 +09:00 committed by GitHub
commit 0d063d41fe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 1 deletions

View File

@ -17,7 +17,15 @@ fi
pip3 install -U pip argparse redis zmq geoip2 flask phonenumbers pycountry
## config
cp -i config/config.cfg.default config/config.cfg
if [ -e "config/config.cfg" ]; then
diff -u config/config.cfg.default config/config.cfg
if [ "$?" == "0" ]; then
cp -f config/config.cfg.default config/config.cfg
else
echo "Your config has changes, giving you a chance to see the changes and decide if you want to overwrite"
cp -i config/config.cfg.default config/config.cfg
fi
fi
## Web stuff
pushd static/