forked from cryptopool-builders/multipool_nomp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
server_cleanup.sh
42 lines (35 loc) · 1.5 KB
/
server_cleanup.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#!/usr/bin/env bash
#####################################################
# Created by cryptopool.builders for crypto use...
#####################################################
source /etc/functions.sh
source /etc/multipool.conf
source $STORAGE_ROOT/nomp/.nomp.conf
echo -e " Installing cron screens to crontab...$COL_RESET"
(crontab -l 2>/dev/null; echo "@reboot source /etc/functions.sh") | crontab -
(crontab -l 2>/dev/null; echo "@reboot source /etc/multipool.conf") | crontab -
(crontab -l 2>/dev/null; echo "@reboot sleep 20 && /home/crypto-data/nomp/starts/nomp.start.sh") | crontab -
echo Creating NOMP startup script...
echo '#!/usr/bin/env bash
source /etc/multipool.conf
################################################################################
# Author: cryptopool.builders
#
#
# Program: nomp screen startup script
#
# BTC Donation: 12Pt3vQhQpXvyzBd5qcoL17ouhNFyihyz5
#
################################################################################
cd $STORAGE_ROOT/nomp/core
screen -dmS nomp node init.js
' | sudo -E tee $STORAGE_ROOT/nomp/starts/nomp.start.sh >/dev/null 2>&1
sudo chmod +x $STORAGE_ROOT/nomp/starts/nomp.start.sh
echo '
source /etc/multipool.conf
source $STORAGE_ROOT/nomp/.nomp.conf
' | sudo -E tee $STORAGE_ROOT/nomp/.prescreens.start.conf >/dev/null 2>&1
echo "source /etc/multipool.conf" | hide_output tee -a ~/.bashrc
echo "source $STORAGE_ROOT/nomp/.prescreens.start.conf" | hide_output tee -a ~/.bashrc
sudo rm -r $STORAGE_ROOT/nomp/nomp_setup
echo -e "$GREEN Done...$COL_RESET"