Skip to main content

Management Scripting Workflow

Configurations:

Windows Workstation:  When working from my Office Desktop, the directories are located on my Google Drive

Kali Linux Laptop:  When working from my Kali Laptop, the directories are located on the Optimus NextCloud Sync

File Locations:

  • Development Location:  This Project is stored on the Optimus Instance of NextCloud.  My Windows Workstation is syncing to my Google drive under...  \Google Drive\!!!MLCR\Optimus\NextCloudSync
  • Project Location:   \Google Drive\!!!MLCR\Optimus\NextCloudSync\Optimus Broadband\MLCR\MikroTik Backups
  • Source Files:  \SourceCode
  • Media used for project:  \Media
  • Folder Structure for Production:  \Staging

Documentation Locations:

  • Documentation:  \Documentation

Production Locations:

  • Endpoints:
    • MikroTik:  Files and Script folders
    • Others to be added
  • FTP Store:

Production File List:

prevrtin.txt Credential File:  Username and Password for SFTP Authentication FTP Store:  \ConfigFiles
backup-script.rsc Main script:  Runs on MikroTik Routers MikroTik Routers:  \System\Scripts






Development Processes

Staging Scripts for Test Runs

  • Deploy the Script in WinBox:
    • From the left panel:  Click System-Scripts
    • Double Click the "backup-script" to open it
    • Highlight the current script in the Source: box with Ctrl+A
    • Paste in the updated script with Ctrl+V
  • Deploying the Script from the Winbox Terminal:
    • /system script  : Navigate to the script folder
    • print  :  Lists all scripts and gives them a number
    • add name="script-name"  :  If adding a new script, this will create a blank script named "script-name".
    • edit 1 source  :  This will open the script editor in the Terminal for editing.  Use the number from the print command for the script to edit