diff --git a/deployment/deploy.bash b/deployment/deploy.bash index 990b8da..71b3884 100644 --- a/deployment/deploy.bash +++ b/deployment/deploy.bash @@ -83,7 +83,8 @@ cd ~ sudo env PATH=$PATH:`pwd`/.nvm/versions/node/v6.9.2/bin `pwd`/.nvm/versions/node/v6.9.2/lib/node_modules/pm2/bin/pm2 startup systemd -u $CURUSER --hp `pwd` cd ~/nodejs-pool sudo chown -R $CURUSER. ~/.pm2 -pm2 install pm2-logrotate +echo "Installing pm2-logrotate in the background!" +pm2 install pm2-logrotate & mysql -u root --password=$ROOT_SQL_PASS < deployment/base.sql mysql -u root --password=$ROOT_SQL_PASS pool -e "INSERT INTO pool.config (module, item, item_value, item_type, Item_desc) VALUES ('api', 'authKey', '`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1`', 'string', 'Auth key sent with all Websocket frames for validation.')" mysql -u root --password=$ROOT_SQL_PASS pool -e "INSERT INTO pool.config (module, item, item_value, item_type, Item_desc) VALUES ('api', 'secKey', '`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1`', 'string', 'HMAC key for Passwords. JWT Secret Key. Changing this will invalidate all current logins.')" diff --git a/deployment/leaf.bash b/deployment/leaf.bash index a419232..79098bb 100644 --- a/deployment/leaf.bash +++ b/deployment/leaf.bash @@ -47,5 +47,6 @@ openssl req -subj "/C=IT/ST=Pool/L=Daemon/O=Mining Pool/CN=mining.pool" -newkey cd ~ sudo env PATH=$PATH:`pwd`/.nvm/versions/node/v6.9.2/bin `pwd`/.nvm/versions/node/v6.9.2/lib/node_modules/pm2/bin/pm2 startup systemd -u $CURUSER --hp `pwd` sudo chown -R $CURUSER. ~/.pm2 -pm2 install pm2-logrotate +echo "Installing pm2-logrotate in the background!" +pm2 install pm2-logrotate & echo "You're setup with a leaf node! Congrats" \ No newline at end of file