Skip to content

Instantly share code, notes, and snippets.

@0x3639
0x3639 / restore.sh
Last active December 2, 2023 11:39
NoM Restore Script
#!/bin/bash
# Ensure the user runs the script with root permissions
if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root"
exit 1
fi
# Check and install wget and unzip if necessary
for cmd in wget unzip; do
@0x3639
0x3639 / go-zenon.sh
Last active June 5, 2024 21:56
Deploy Go-Zenon
#!/bin/bash
# Large ASCII Art for Zenon Network
echo "
███████╗███████╗███╗░░██╗░█████╗░███╗░░██╗  ███╗░░██╗███████╗████████╗░██╗░░░░░░░██╗░█████╗░██████╗░██╗░░██╗
╚════██║██╔════╝████╗░██║██╔══██╗████╗░██║  ████╗░██║██╔════╝╚══██╔══╝░██║░░██╗░░██║██╔══██╗██╔══██╗██║░██╔╝
░░███╔═╝█████╗░░██╔██╗██║██║░░██║██╔██╗██║  ██╔██╗██║█████╗░░░░░██║░░░░╚██╗████╗██╔╝██║░░██║██████╔╝█████═╝░
██╔══╝░░██╔══╝░░██║╚████║██║░░██║██║╚████║  ██║╚████║██╔══╝░░░░░██║░░░░░████╔═████║░██║░░██║██╔══██╗██╔═██╗░
███████╗███████╗██║░╚███║╚█████╔╝██║░╚███║  ██║░╚███║███████╗░░░██║░░░░░╚██╔╝░╚██╔╝░╚█████╔╝██║░░██║██║░╚██╗
╚══════╝╚══════╝╚═╝░░╚══╝░╚════╝░╚═╝░░╚══╝  ╚═╝░░╚══╝╚══════╝░░░╚═╝░░░░░░╚═╝░░░╚═╝░░░╚════╝░╚═╝░░╚═╝╚═╝░░╚═╝
@0x3639
0x3639 / deploy-orchestrator.sh
Last active August 28, 2023 13:45
deploy-orchestrator.sh
#!/bin/bash
# Function to check if a program is installed
function check_program() {
which $1 &>/dev/null
return $?
}
# Function to modify the /root/.orchestrator/config.json file
function modify_config_json() {
@0x3639
0x3639 / upgrade_orchestrator.sh
Created June 5, 2024 14:39
Script to Upgrade a Zenon Network Orchestrator
#!/bin/bash
set -e
# Get the latest release from GitHub API
latest_release=$(curl -s https://api.github.com/repos/HyperCore-Team/orchestrator/releases/latest | jq -r ".assets[] | select(.name | contains(\"linux-amd64.zip\")) | .browser_download_url")
# Download the latest release
wget -O orchestrator-linux-amd64.zip "$latest_release"
unzip -o orchestrator-linux-amd64.zip