Skip to content

There is a way to automate the radar.conf generation #3

@ronin1

Description

@ronin1

I am working on an implementation that uses dockerize script & poll the API for success or response state. I may or may not pull request what I have. Until then, here's a working script using expect for you. This works for me.

At build time of the Docker image or at run time with the following environments set:

  • RUNSCOPE_USR=my@email.com
  • RUNSCOPE_PWD=changeme
  • RUNSCOPE_PATH=/usr/local/bin/runscope-radar

Save the following into a .sh file & chmod +x it

#!/usr/bin/env expect

spawn $::env(RUNSCOPE_PATH)
expect "Email: "
send "$::env(RUNSCOPE_USR)\n"
expect "Password (typing will be hidden): "
send "$::env(RUNSCOPE_PWD)\n"
expect "Would you like to save these settings into a configuration file? (Y/N) "
send "Y\n"
expect "Enter a filename to save as (default: ./radar.conf):"
send "\n"
expect "Next time run radar with the option:"
#send ctrl c
send \x03
send "\n"

With the above environment variables in place & this script executed, it should generate a radar.conf file for you after

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions