-
Notifications
You must be signed in to change notification settings - Fork 13
/
package_for_new_image.sh
executable file
·52 lines (40 loc) · 1.41 KB
/
package_for_new_image.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
43
44
45
46
47
48
49
50
51
#!/bin/bash
echo "Do you really want to do this? It will delete all the wallet files and all of the conf files in /etc/init and log files!!"
echo "yes/no"
read answer
case $answer in
no) exit ;;
yes)
sudo service mos_bitmonero stop
FILEDIR="/home/bob/.monerodo"
rm $FILEDIR/first_time.txt
echo "yes" > $FILEDIR/first_time.txt
sudo cp $FILEDIR/first_time.txt /monerodo/
sudo rm /etc/init/mos_*
sudo rm /monerodo/wallets/*
sudo rm /monerodo/zone_pool/logs/*
sudo rm /monerodo/sam_pool/logs/*
sudo rm /var/log/upstart/mos_*
sudo rm /var/log/upstart/mossys_*
rm /home/bob/wallets/viewonly/*
rm /home/bob/.monerodo/mos_*
rm /home/bob/.monerodo/*.txt
rm /home/bob/.monerodo/*.info
cp /home/bob/monerodo/conf_files/mos_bitmonero.conf /home/bob/.monerodo/
cp /home/bob/monerodo/conf_files/mos_poolnode.conf /home/bob/.monerodo/
echo "yes" > $FILEDIR/first_time.txt
sudo cp $FILEDIR/first_time.txt /monerodo/
echo "Monerod hasn't run yet!" > /home/bob/.monerodo/status.txt
echo "The pool wallet and server haven't run yet!" > /home/bob/.monerodo/status_poolwallet.txt
echo "The MiniNodo wallet and server haven't run yet!" > /home/bob/.monerodo/status_nodowallet.txt
;;
esac
echo "Put the new keymaker in the upstart folder? Use this only when really burning a new image. A restart will delete this again."
echo "yes/no"
read answer2
case $answer2 in
yes)
sudo cp /home/bob/monerodo/conf_files/mos_newkeys.conf /etc/init/
;;
no)exit;;
esac