Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.
/ farmerbot-script Public archive

Automatic .env and config.md Script for Farmerbot (.sh and .py)

Notifications You must be signed in to change notification settings

Mik-TF/farmerbot-script

Repository files navigation

This repo is archived as a new Farmerbot has been released. The code here is no longer relevant.

*** NOTE: You can now use the binaries code to deploy this program. It is available here. ***

Automatic .env and config.md Script for Farmerbot (Bash, Python and VLang)

The following script generates the .env and config.md files for the Farmerbot.

The script is available for Bash, Pyhton and VLang.

This is a first draft. It should write the files properly. I set this as an issue to get feedback from the community and the dev team and then adjust accordingly.

EDIT: There is a new version with queries to Grid Proxy to complete data when possible. With the node ID, we get the twin ID, the dedicated status, certification status, public configuration status, as also the farm. With the farm, we calculate the public IPs. Thus the farmer only needs to write the minimum information.


Steps to Create the Files

  • Create a folder to store the script and the files
    • cd ~
      
    • mkdir -p farmerbot_script && cd "$_" || exit
      
  • Download the script
    • Bash version
      • wget -O farmerbot_script.sh https://raw.githubusercontent.com/Mik-TF/farmerbot-script/main/farmerbot_script.sh
        
    • Python version
      • wget -O farmerbot_script.py https://raw.githubusercontent.com/Mik-TF/farmerbot-script/main/farmerbot_script.py
        
    • Vlang version basic
      • wget -O farmerbot_script.v https://raw.githubusercontent.com/Mik-TF/farmerbot-script/main/farmerbot_script.v
        
    • Vlang version Gridproxy (automatic completion of data when possible)
      • wget -O farmerbot_script.v https://raw.githubusercontent.com/Mik-TF/farmerbot-script/main/farmerbot_script_gridproxy.v
        
  • Set the permissions to run the script
    • Bash version
      • chmod +x farmerbot_script.sh
        
  • Run the script
    • Bash version
      • ./farmerbot_script.sh
        
    • Python version
      • python farmerbot_script.py
        
    • Vlang version
      • v run farmerbot_script.v
        
  • Enter the values asked
  • The .env and config.md files are saved in the folder /farmerbot_script/farmerbot_files

Steps to See the Content of the Files

  • Go to the newly created folder
    • cd farmerbot_files
      
  • See the content of the file config.md
    • cat config.md
      
  • See the content of the file .env
    • cat .env
      

About

Automatic .env and config.md Script for Farmerbot (.sh and .py)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published