linking entire data dir to allow for future files.

This commit is contained in:
unknown 2016-05-09 08:45:08 +01:00
parent edb9bd23fe
commit fa85d4e0b4
4 changed files with 13 additions and 5 deletions

5
init/30_oldconfig.sh Normal file
View File

@ -0,0 +1,5 @@
#!/bin/bash
#Test For Old Style config files
if [-d /config/data]; then echo "Data dir ok"; else mkdir -p /config/data; fi
if test -f "/config/config.json"; then mv /config/config.json /config/data/config.json; else echo "New Config"; fi
if test -f "/config/nadekobot.sqlite"; then mv /config/nadekobot.sqlite /config/data/nadekobot.sqlite; else echo "New SQlite"; fi

View File

@ -1,9 +1,14 @@
#!/bin/bash
##Install NadekoBot
#Cleanup Old
rm -rf /root/NadekoBot
#Get NadekoBot Latest
curl -s https://api.github.com/repos/Kwoth/NadekoBot/releases | grep browser_download_url | head -n 1 | cut -d '"' -f 4|wget -i - -O /root/NadekoBot.latest.zip &&\
unzip /root/NadekoBot.latest.zip -d /root/NadekoBot
#Sync any new data files
rsync --ignore-existing -r /root/NadekoBot/data /config
#Remove data folder
rm -rf /root/NadekoBot/data

View File

@ -8,10 +8,8 @@ if test -f "/config/config.json"; then echo "Config Exist"; else cp /root/Nadeko
#Remove Built in
rm /root/NadekoBot/credentials.json
rm /root/NadekoBot/data/nadekobot.sqlite
rm /root/NadekoBot/data/config.json
#Adding Config file sym links
ln -s /config/credentials.json /root/NadekoBot/credentials.json
ln -s /config/nadekobot.sqlite /root/NadekoBot/data/nadekobot.sqlite
ln -s /config/config.json /root/NadekoBot/data/config.json
sudp ln -ds /config/data /root/nadekobot/data