E5sub Renews Robot SQLite Edition

 wallpaper

brief introduction

E5SubBot It is a Bot software for E5 renewal. Because the project uses MYSQL database, it is obviously impractical to install MYSQL on a small memory server. The only option is to use remote MYSQL to connect to databases on other servers. Based on this, I have( iyear/E5SubBot )Make simple modifications and replace E5SubBot MySQL driver in github.com/go-sql-driver/mysql by github.com/mattn/go-sqlite3 , and named E5SubBot For SQLite At the same time E5SubBot Based on the project, use gettext-go The library separates languages and realizes language internationalization. at present E5SubBot For SQLite The executable binary files provided in the project releases are cross compiled by the xgo tool CGO.

At present, the project only provides simplified Chinese and English. If you need other languages, you can modify the json text in language.go to add a translation corresponding to the new language, and then compile it. If the server memory is enough, it is recommended to install the Docker version to avoid most tedious operations.

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
  1. 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
  1. 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
  1. 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
  1. Download project source code
 git clone  https://github.com/rainerosion/E5SubBotForSQLite.git
  1. 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

Create in the same directory config.yml , coded as UTF-8 among dbfile and lang It is a new configuration item in the SQLite version. lang Valid only in v0.2.2.

Configure template:

 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

bindmax , notice , admin , errlimit Hot update, direct update config.yml Save it

Configuration Item explain
bot_token Replace with your own BotToken
socks5 Socks5 The agent does not need to be deleted. For example: 127.0.0.1:1080
notice Announcement. Consolidated into /help
admin administrators tgid , go to https://t.me/userinfobot Get with , separate; Administrator authority: call the task manually to get the total feedback of the task
errlimit The maximum number of errors in a single account will automatically unbind the single account and send a notice when it is full, and the value will be changed to a negative number without limiting the number of errors (-1) OK; All error times will be reset after the bot is restarted
cron API call frequency, using cron expression
bindmax Maximum Bindable Number
dbfile Sqlite database file name
lang Simplified Chinese (default): zh_CN English: en_US

epilogue

After all the above is ready, you can enter Telegram to chat with the bot you set up, bind your account to your E5 account, and start the renewal journey. Renewal is a metaphysical problem and may not succeed. It is recommended to use it together with OneIndex.

Comment area
 head portrait
     head portrait
    yearn19
      

    Dear independent blogger, your blog has been included in Blog Utopia, which is a Chinese independent blog article aggregation search platform. If you have any questions, you can go to https://utopiablog.cn Leave a message and wish you a happy New Year!

     head portrait
    sun
      

    Does the Docker image have arm64

       head portrait
      @sun

      No, binary file is recommended

     head portrait

    Front row, front row, worship the big guy

     head portrait
    Ling Yi
      

    Dalao, I just have to worship

       head portrait
      @Ling Yi

      🙈🙈

     head portrait
    Brother Jiang
      

    I can't understand the path!

       head portrait
      @Brother Jiang

      If you don't understand it, you are right. ha-ha

Article Contents