brief introduction
deploy
-
Deploy E5SubBot For SQLite on Docker
#Create a folder for storing data mkdir /opt/e5sub #(Important) Create database file touch /opt/e5sub/e5sub.db #Download Profile wget --no-check-certificate -O /opt/e5sub/config.yml https://raw.githubusercontent.com/rainerosion/E5SubBotForSQLite/master/config.yml.example #Modify the information in the configuration file vim /opt/e5sub/config.yml #Start running in docker docker run -d -v /opt/e5sub/config.yml:/root/config.yml -v /opt/e5sub/e5sub.db:/root/e5sub.db --restart=always --name e5bot rainerosion/e5subbot-sqlite #After startup, you can check the startup status through the following command docker logs e5bot -f
-
Deploy as Systemd daemon
-
Download the necessary files and configurations and unzip them.
wget https://github.com/rainerosion/E5SubBotForSQLite/releases/download/0.2.2/E5SubBot-linux-amd64.tar.gz #Unzip files tar xvjf E5SubBot_linux_x64.tar.gz #Create Folder mkdir /opt/e5sub #Move files mv ./ E5SubBot /opt/e5sub/E5SubBot #Add Execution Permission chmod a+x /opt/e5sub/E5SubBot #Edit configuration file (please read deployment configuration for file contents) vim /opt/e5sub/config.yml
-
Edit cell file file vim /etc/systemd/system/e5sub.service
[Unit] Description=Telegram E5Sub Bot [Service] Type=simple WorkingDirectory=/opt/e5sub ExecStart=/opt/e5sub/E5SubBot Restart=always RestartSec=30 [Install] WantedBy=multi-user.target
-
Reload the configuration and start the service
#Overload Profile systemctl daemon-reload #Start automatically systemctl enable e5sub #Start Service systemctl start e5sub
-
Self compiling executable binary file
-
Download project source code
git clone https://github.com/rainerosion/E5SubBotForSQLite.git
-
Compilation (the golang environment needs to be installed)
# Linux CGO_ENABLED=1 go build #If the above command reports an error in Windows, please compile it in the following way go env -w CGO_ENABLED=1 go build
configuration file
bot_token: YOUR_BOT_TOKEN socks5: 127.0.0.1:1080 Notice: "First line nSecond line" admin: 66666,77777,88888 errlimit: 5 cron: "1 */3 * * *" bindmax: 3 dbfile: "e5sub.db" lang: zh_CN
| |
---|---|
| |
| |
| |
| |
| |
| |
| |
| |
| |
epilogue