linking entire data dir to allow for future files.
This commit is contained in:
parent
edb9bd23fe
commit
fa85d4e0b4
5
init/30_oldconfig.sh
Normal file
5
init/30_oldconfig.sh
Normal 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
|
@ -1,9 +1,14 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
##Install NadekoBot
|
##Install NadekoBot
|
||||||
|
|
||||||
#Cleanup Old
|
#Cleanup Old
|
||||||
rm -rf /root/NadekoBot
|
rm -rf /root/NadekoBot
|
||||||
|
|
||||||
#Get NadekoBot Latest
|
#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 &&\
|
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
|
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
|
@ -8,10 +8,8 @@ if test -f "/config/config.json"; then echo "Config Exist"; else cp /root/Nadeko
|
|||||||
|
|
||||||
#Remove Built in
|
#Remove Built in
|
||||||
rm /root/NadekoBot/credentials.json
|
rm /root/NadekoBot/credentials.json
|
||||||
rm /root/NadekoBot/data/nadekobot.sqlite
|
|
||||||
rm /root/NadekoBot/data/config.json
|
|
||||||
|
|
||||||
#Adding Config file sym links
|
#Adding Config file sym links
|
||||||
ln -s /config/credentials.json /root/NadekoBot/credentials.json
|
ln -s /config/credentials.json /root/NadekoBot/credentials.json
|
||||||
ln -s /config/nadekobot.sqlite /root/NadekoBot/data/nadekobot.sqlite
|
sudp ln -ds /config/data /root/nadekobot/data
|
||||||
ln -s /config/config.json /root/NadekoBot/data/config.json
|
|
Loading…
Reference in New Issue
Block a user