New certmgr method, ugly.
This commit is contained in:
parent
96bf7952dc
commit
768a3417ff
21
DockerFile
21
DockerFile
@ -11,25 +11,6 @@ RUN add-apt-repository ppa:mc3man/trusty-media -y
|
|||||||
RUN apt-get -q update && \
|
RUN apt-get -q update && \
|
||||||
apt-get install -qy wget libopus0 opus-tools libopus-dev mono-devel unzip ffmpeg
|
apt-get install -qy wget libopus0 opus-tools libopus-dev mono-devel unzip ffmpeg
|
||||||
|
|
||||||
# Get NadekoBot Latest
|
|
||||||
RUN 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
|
|
||||||
|
|
||||||
##Setup Certificates
|
|
||||||
#RUN mozroots --import --ask-remove --machine &&\
|
|
||||||
#certmgr --ssl https://gateway.discord.gg
|
|
||||||
|
|
||||||
#Test config files present
|
|
||||||
RUN cred="/config/credentials.json" &&\
|
|
||||||
if [ -f "$cred" ] ; then echo "Credentials exist" ; else cp /root/NadekoBot/credentials_example.json /config/credentials.json ; fi
|
|
||||||
|
|
||||||
RUN sql="/config/nadekobot.sqlite" &&\
|
|
||||||
if [ -f "$sql" ] ; then echo "SQLite DB exists" ; else echo "" > /config/nadekobot.sqlite ;fi
|
|
||||||
|
|
||||||
#Adding Config file sym links
|
|
||||||
RUN ln /config/credentials.json /root/NadekoBot/credentials.json &&\
|
|
||||||
ln /config/nadekobot.sqlite /root/NadekoBot/data/nadekobot.sqlite
|
|
||||||
|
|
||||||
#Mappings and ports
|
#Mappings and ports
|
||||||
VOLUME ["/config"]
|
VOLUME ["/config"]
|
||||||
|
|
||||||
@ -41,4 +22,4 @@ rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
|||||||
#Adding Custom files
|
#Adding Custom files
|
||||||
ADD init/ /etc/my_init.d/
|
ADD init/ /etc/my_init.d/
|
||||||
ADD services/ /etc/service/
|
ADD services/ /etc/service/
|
||||||
RUN chmod -v +x /etc/service/*/run /etc/my_init.d/*.sh
|
RUN chmod -v +x /etc/service/*/run /etc/my_init.d/*.sh
|
6
init/30_certificates.sh
Normal file
6
init/30_certificates.sh
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
#Import Certificates
|
||||||
|
mozroots --import --ask-remove --machine
|
||||||
|
echo Y |certmgr --ssl https://gateway.discord.gg /all
|
||||||
|
echo Y |certmgr --ssl https://gateway.discord.gg /all
|
||||||
|
echo Y |certmgr --ssl https://gateway.discord.gg /all
|
@ -1 +0,0 @@
|
|||||||
#!/bin/bash
|
|
16
init/40_configuration.sh
Normal file
16
init/40_configuration.sh
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
#Test Configuration
|
||||||
|
|
||||||
|
cred="/config/credentials.json"
|
||||||
|
if [ -f "$cred" ] ; then echo "Credentials exist" ; else cp /root/NadekoBot/credentials_example.json /config/credentials.json ; fi
|
||||||
|
|
||||||
|
sql="/config/nadekobot.sqlite"
|
||||||
|
if [ -f "$sql" ] ; then echo "SQLite DB exists" ; else echo "" > /config/nadekobot.sqlite ;fi
|
||||||
|
|
||||||
|
#Remove Built in
|
||||||
|
rm /root/NadekoBot/credentials.json
|
||||||
|
rm /root/NadekoBot/data/nadekobot.sqlite
|
||||||
|
|
||||||
|
#Adding Config file sym links
|
||||||
|
ln -s /config/credentials.json /root/NadekoBot/credentials.json
|
||||||
|
ln -s /config/nadekobot.sqlite /root/NadekoBot/data/nadekobot.sqlite
|
9
init/50_nadekoinstall.sh
Normal file
9
init/50_nadekoinstall.sh
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
##Install NadekoBot
|
||||||
|
|
||||||
|
#Backup Existing NadekoBot
|
||||||
|
rsync /root/NadekoBot /root/NadekoBot.bak
|
||||||
|
|
||||||
|
#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
|
Loading…
Reference in New Issue
Block a user