forked from hyperledger/indy-node
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for supervisord (hyperledger#588)
* Adding support for supervisord which requires setting the INDY_CONTROL environment variable to supervisorctl Signed-off-by: Keith Smith <[email protected]> * Fixes per review from andkononykhin Signed-off-by: Keith Smith <[email protected]> * More changes per Andrey's review Signed-off-by: Keith Smith <[email protected]>
- Loading branch information
1 parent
0400e35
commit 31c0328
Showing
5 changed files
with
163 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,32 @@ | ||
#!/bin/bash -x | ||
|
||
# Upgrade may change service files | ||
systemctl daemon-reload | ||
systemctl reset-failed | ||
if [ "$INDY_CONTROL" = "" ]; then | ||
|
||
echo "Starting indy-node" | ||
systemctl start indy-node | ||
# Upgrade may change service files | ||
systemctl daemon-reload | ||
systemctl reset-failed | ||
|
||
echo "Restarting agent" | ||
systemctl restart indy-node-control | ||
echo "Starting indy-node" | ||
systemctl start indy-node | ||
|
||
echo "Restarting agent" | ||
systemctl restart indy-node-control | ||
|
||
elif [ "$INDY_CONTROL" = "supervisorctl" ]; then | ||
|
||
# Upgrade may change service files | ||
supervisorctl reread | ||
supervisorctl update | ||
|
||
echo "Starting indy-node" | ||
supervisorctl start indy-node | ||
|
||
echo "Restarting agent" | ||
supervisorctl restart indy-node-control | ||
|
||
else | ||
|
||
echo "Invalid setting for 'INDY_CONTROL' environment variable: $INDY_CONTROL" | ||
exit 1 | ||
|
||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters