Commit 4f97c548 authored by TonyFord's avatar TonyFord
Browse files

add expect to dockerfile

parent f2cf90da
...@@ -76,7 +76,7 @@ load_wallet: ...@@ -76,7 +76,7 @@ load_wallet:
- export RUNNER_UID=`id -u` - export RUNNER_UID=`id -u`
- export RUNNER_GID=`id -g` - export RUNNER_GID=`id -g`
script: script:
- docker-compose exec -T faircoin ./electrumfair/run_electrumfair daemon load_wallet --wallet .electrumfair/wallets/${WALLET:-default_wallet} - docker-compose exec -T faircoin ./load_wallet.expect ${WALLET:-default_wallet} ${PASSWORD}
- docker-compose exec -T faircoin ./electrumfair/run_electrumfair getbalance --wallet .electrumfair/wallets/${WALLET:-default_wallet} - docker-compose exec -T faircoin ./electrumfair/run_electrumfair getbalance --wallet .electrumfair/wallets/${WALLET:-default_wallet}
close_wallet: close_wallet:
......
...@@ -18,7 +18,8 @@ RUN apt-get update -q && \ ...@@ -18,7 +18,8 @@ RUN apt-get update -q && \
libdb++-dev \ libdb++-dev \
libdb-dev \ libdb-dev \
wget \ wget \
curl curl \
expect
#####################################################################################root## #####################################################################################root##
### install nano commandline editor [optional] ( to edit faircoin.conf later if necessary ) ### install nano commandline editor [optional] ( to edit faircoin.conf later if necessary )
...@@ -66,6 +67,10 @@ COPY ./stop_faircoin_services.sh /home/faircoin/stop_faircoin_services.sh ...@@ -66,6 +67,10 @@ COPY ./stop_faircoin_services.sh /home/faircoin/stop_faircoin_services.sh
RUN chown faircoin:faircoin /home/faircoin/stop_faircoin_services.sh RUN chown faircoin:faircoin /home/faircoin/stop_faircoin_services.sh
RUN chmod +x /home/faircoin/stop_faircoin_services.sh RUN chmod +x /home/faircoin/stop_faircoin_services.sh
COPY ./load_wallet.expect /home/faircoin/load_wallet.expect
RUN chown faircoin:faircoin /home/faircoin/load_wallet.expect
RUN chmod +x /home/faircoin/load_wallet.expect
USER faircoin USER faircoin
#################################################################################faircoin## #################################################################################faircoin##
### download and build faircoin daemon and cli ############################################ ### download and build faircoin daemon and cli ############################################
......
#!/usr/bin/expect
set wallet [lindex $argv 0]
set pass [lindex $argv 1]
set timeout 5
spawn ./electrumfair/run_electrumfair daemon load_wallet --wallet /home/faircoin/.electrumfair/wallets/$wallet
#Login
expect "Password: "
send -- "$pass\n"
expect eof
exit
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment