Created
July 2, 2020 22:35
-
-
Save Someguy123/e81b9bd2c0e59beccfbee08e9814d4cf to your computer and use it in GitHub Desktop.
Hivemind Jussi Restarter Script
This file contains hidden or 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
#!/usr/bin/env bash | |
########################################## | |
# | |
# Hivemind + Jussi Restarter Script | |
# | |
# (C) 2020 Someguy123 ( www.privex.io ) | |
# License: MIT/X11 | |
# | |
########################################## | |
export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:${PATH}" | |
export PATH="${HOME}/.local/bin:${PATH}" | |
: ${CT_HMIND="hivemind"} | |
: ${CT_JUSSI="jussi"} | |
: ${RPC_DIR="/root/rpc"} | |
: ${HMIND_DIR="/root/hivemind-docker"} | |
. /etc/zsh_files/colors.zsh | |
# ----------------------------------------- | |
msg bold cyan "\n [...] Restarting hivemind" | |
cd "${HMIND_DIR}" | |
msg yellow " -> Stopping Hivemind ..." | |
docker-compose stop "${CT_HMIND}" | |
msg yellow " -> Removing Hivemind ..." | |
docker-compose rm -f "${CT_HMIND}" | |
msg yellow " -> Starting Hivemind ..." | |
docker-compose up -d "${CT_HMIND}" | |
msg bold green "\n [+++] Successfully restarted hivemind :)\n" | |
# ----------------------------------------- | |
msg bold cyan " [...] Restarting jussi" | |
cd "${RPC_DIR}" | |
docker-compose restart "${CT_JUSSI}" | |
msg bold green "\n [+++] Successfully restarted jussi :) \n" | |
# ----------------------------------------- | |
msg bold green "\n +++++++ Finished +++++++ \n" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment