Skip to content

Instantly share code, notes, and snippets.

@skarlekar
Created April 23, 2018 16:31
Show Gist options
  • Save skarlekar/df1041fba53602e16d2551d8206a3f04 to your computer and use it in GitHub Desktop.
Save skarlekar/df1041fba53602e16d2551d8206a3f04 to your computer and use it in GitHub Desktop.
Auto Start Hyperledger Fabric, HLF REST Server and Composer Playground from Ubuntu. Script expects Unix command 'expect' to be installed.
#!/usr/bin/expect -f
spawn su - hyperuser
expect "Password:"
send "<hyperuser-password>\r";
expect "hyperuser$"
send "cd ~/fabric-tools; ls\r"
expect "hyperuser$"
send "/home/hyperuser/fabric-tools/fabricUtil.sh start\r"
expect "hyperuser$"
send "echo HLF Containers started\r"
expect "hyperuser$"
send "composer-rest-server -c admin@grants-bna -n always &"
expect "hyperuser$"
send "echo HLF REST Server started\r"
expect "hyperuser$"
send "nohup composer-playground &\r"
expect "hyperuser$"
send "echo HLF Composer Playground started\r"
expect "hyperuser$"
send "exit\r"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment