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
sudo apt -y install monit | |
echo "Creating monit config to restart zend automatically" | |
wget https://gist.githubusercontent.com/iamniks/7371ca06aa9469c3a61fbd21f5e8e7a9/raw/699c67df4804e1ae88498225e61d16285f74c637/zen_node.sh | |
chmod u+x /home/$USER/zen_node.sh | |
sed -i "s/%USER%/$USER/g" zen_node.sh |
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
#!/bin/bash | |
PID_FILE='/home/%USER%/.zen/zen_node.pid' | |
start() { | |
touch $PID_FILE | |
eval "/bin/su %USER% -c '/usr/bin/zend 2>&1 >> /dev/null'" | |
PID=$(ps aux | grep zend | grep -v grep | awk '{print $2}') | |
echo "Starting zend with PID $PID" | |
echo $PID > $PID_FILE |
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
#!/usr/bin/env bash | |
# IMPORTANT: Run this script from /home/<USER>/ directory: bash -c "$(curl SCRIPT_URL)" | |
# (optional): Preparing the environment if you want to install zen from source: | |
# Once you get the VM up and running you need to login with your root account and run below commands. | |
# apt-get update && apt-get upgrade -y | |
# apt-get install -y build-essential pkg-config libc6-dev m4 g++-multilib autoconf libtool ncurses-dev unzip git python zlib1g-dev wget bsdmainutils automake libgtk2.0-dev && apt-get autoremove -y |