Skip to content

Commit

Permalink
Fix for issue #7 (#9)
Browse files Browse the repository at this point in the history
* Fix for #7

* Add STOPSIGNAL directive
  • Loading branch information
nolim1t authored Oct 13, 2020
1 parent 099703a commit 3f066dd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,6 @@ RUN mkdir /lnd/ /secrets/ /statuses/
COPY switch.sh /usr/local/bin/switch
RUN chmod +x /usr/local/bin/switch

STOPSIGNAL SIGINT

ENTRYPOINT ["/usr/local/bin/switch"]
4 changes: 4 additions & 0 deletions switch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@

# Output: /statuses/node-status-bitcoind-ready (when ready, where a service can pick it up)

# Trap signal SIGINT - Explicitly define it
trap exit INT

# Setup environment variables
RPCUSER="${RPCUSER:-lncm}" # Default Username: lncm
RPCPASS="${RPCPASS:-$(cat /secrets/rpcpass.txt)}" # Default password location: /secrets/rpcpass.txt
SLEEPTIME="${SLEEPTIME:-3600}" # Default sleep: 3600
Expand Down

0 comments on commit 3f066dd

Please sign in to comment.