mirror of
https://github.com/mynodebtc/mynode.git
synced 2024-12-25 05:58:06 +00:00
Fix chpasswd for thunderhub; Update service files
This commit is contained in:
parent
db29743190
commit
e4c772953a
|
@ -2,6 +2,10 @@
|
|||
|
||||
Various restrictions and behaviors of myNode and the various applications will be documented below.
|
||||
|
||||
## THunderhub
|
||||
## Thunderhub
|
||||
|
||||
- When Thunderhub is first installed, logging in will be disabled. You must either change your password or log out and log back in of the the myNode UI before using Thunderhub. At that point, Thunderhub will use the same password as myNode.
|
||||
|
||||
## BTC Pay Server
|
||||
|
||||
- The upgrade button within BTC Pay Server will not work on myNode. Upgrades are performed as part of the myNode upgrade process.
|
|
@ -16,7 +16,6 @@ ExecStart=/usr/bin/npm start
|
|||
User=bitcoin
|
||||
Group=bitcoin
|
||||
Type=simple
|
||||
LimitNOFILE=128000
|
||||
TimeoutSec=120
|
||||
Restart=always
|
||||
RestartSec=60
|
||||
|
|
|
@ -21,8 +21,7 @@ TTYReset=yes
|
|||
User=bitcoin
|
||||
Group=bitcoin
|
||||
Type=simple
|
||||
KillMode=process
|
||||
LimitNOFILE=128000
|
||||
KillMode=control-group
|
||||
TimeoutSec=30
|
||||
Restart=on-failure
|
||||
RestartSec=120
|
||||
|
|
|
@ -16,7 +16,7 @@ ExecStart=/usr/bin/npm start
|
|||
User=root
|
||||
Group=root
|
||||
Type=simple
|
||||
KillMode=process
|
||||
KillMode=control-group
|
||||
TimeoutSec=30
|
||||
Restart=on-failure
|
||||
RestartSec=120
|
||||
|
|
|
@ -16,7 +16,7 @@ ExecStart=/opt/mynode/dojo/docker/my-dojo/dojo.sh start
|
|||
ExecStop=/opt/mynode/dojo/docker/my-dojo/dojo.sh stop
|
||||
User=root
|
||||
Group=root
|
||||
KillMode=process
|
||||
KillMode=control-group
|
||||
TimeoutSec=420
|
||||
Restart=always
|
||||
RestartSec=60
|
||||
|
|
|
@ -8,7 +8,7 @@ After=mynode.service
|
|||
|
||||
[Service]
|
||||
Type=simple
|
||||
KillMode=process
|
||||
KillMode=control-group
|
||||
TimeoutSec=30
|
||||
Restart=always
|
||||
RestartSec=10
|
||||
|
|
|
@ -9,7 +9,7 @@ After=www.service
|
|||
|
||||
[Service]
|
||||
Type=simple
|
||||
KillMode=process
|
||||
KillMode=control-group
|
||||
TimeoutSec=30
|
||||
Restart=always
|
||||
RestartSec=10
|
||||
|
|
|
@ -7,7 +7,7 @@ After=network.target mynode.service
|
|||
|
||||
[Service]
|
||||
Type=simple
|
||||
KillMode=process
|
||||
KillMode=control-group
|
||||
ExecStart=/usr/bin/mynode_invalid_block_check.sh
|
||||
User=root
|
||||
Group=root
|
||||
|
|
|
@ -19,7 +19,6 @@ ExecStart=/bin/sh -c 'cd /opt/mynode/lnbits && /usr/local/bin/pipenv run flask r
|
|||
User=bitcoin
|
||||
Group=bitcoin
|
||||
Type=simple
|
||||
LimitNOFILE=128000
|
||||
TimeoutSec=240
|
||||
Restart=always
|
||||
RestartSec=60
|
||||
|
|
|
@ -16,7 +16,7 @@ ExecStartPost=/bin/echo 'abc' > /mnt/hdd/mynode/lnd/data/chain/bitcoin/mainnet/p
|
|||
User=bitcoin
|
||||
Group=bitcoin
|
||||
Type=simple
|
||||
KillMode=control-group
|
||||
KillMode=process
|
||||
LimitNOFILE=128000
|
||||
TimeoutSec=240
|
||||
Nice=-1
|
||||
|
|
|
@ -13,7 +13,6 @@ User=root
|
|||
Group=root
|
||||
Type=simple
|
||||
KillMode=control-group
|
||||
LimitNOFILE=128000
|
||||
TimeoutSec=30
|
||||
Restart=always
|
||||
RestartSec=30
|
||||
|
|
|
@ -16,8 +16,7 @@ ExecStart=/usr/bin/npm start
|
|||
User=bitcoin
|
||||
Group=bitcoin
|
||||
Type=simple
|
||||
KillMode=process
|
||||
LimitNOFILE=128000
|
||||
KillMode=control-group
|
||||
TimeoutSec=240
|
||||
Restart=always
|
||||
RestartSec=60
|
||||
|
|
|
@ -7,14 +7,14 @@ Wants=lnd.service
|
|||
After=lnd.service
|
||||
|
||||
[Service]
|
||||
ExecStartPre=/usr/bin/is_not_shutting_down.sh
|
||||
ExecStartPre=/usr/bin/wait_on_lnd.sh
|
||||
ExecStart=/usr/local/bin/loopd
|
||||
|
||||
User=bitcoin
|
||||
Group=bitcoin
|
||||
Type=simple
|
||||
KillMode=process
|
||||
LimitNOFILE=128000
|
||||
KillMode=control-group
|
||||
TimeoutSec=240
|
||||
Restart=always
|
||||
RestartSec=60
|
||||
|
|
|
@ -16,7 +16,7 @@ ExecStop=/usr/local/bin/docker-compose -f netdata-compose.yml down
|
|||
User=bitcoin
|
||||
Group=bitcoin
|
||||
Type=simple
|
||||
KillMode=process
|
||||
KillMode=control-group
|
||||
TimeoutSec=240
|
||||
Restart=always
|
||||
RestartSec=60
|
||||
|
|
|
@ -15,7 +15,6 @@ ExecStart=/usr/bin/node rtl
|
|||
User=bitcoin
|
||||
Group=bitcoin
|
||||
Type=simple
|
||||
LimitNOFILE=128000
|
||||
TimeoutSec=240
|
||||
Restart=always
|
||||
RestartSec=60
|
||||
|
|
|
@ -16,8 +16,7 @@ ExecStart=/usr/bin/npm run start:compatible -- -p 3030
|
|||
User=bitcoin
|
||||
Group=bitcoin
|
||||
Type=simple
|
||||
KillMode=process
|
||||
LimitNOFILE=128000
|
||||
KillMode=control-group
|
||||
TimeoutSec=240
|
||||
Restart=always
|
||||
RestartSec=60
|
||||
|
|
|
@ -8,7 +8,7 @@ After=mynode.service bitcoind.service
|
|||
|
||||
[Service]
|
||||
Type=simple
|
||||
KillMode=process
|
||||
KillMode=control-group
|
||||
TimeoutSec=30
|
||||
Restart=always
|
||||
RestartSec=10
|
||||
|
|
|
@ -8,7 +8,7 @@ After=mynode.service
|
|||
|
||||
[Service]
|
||||
Type=simple
|
||||
KillMode=process
|
||||
KillMode=control-group
|
||||
TimeoutSec=30
|
||||
Restart=always
|
||||
RestartSec=10
|
||||
|
|
|
@ -11,7 +11,7 @@ ExecStart=/usr/bin/java -jar /opt/mynode/whirlpool/whirlpool.jar --server=mainne
|
|||
User=bitcoin
|
||||
Group=bitcoin
|
||||
Type=simple
|
||||
KillMode=process
|
||||
KillMode=control-group
|
||||
TimeoutSec=60
|
||||
Restart=always
|
||||
RestartSec=60
|
||||
|
|
|
@ -5,10 +5,10 @@ PASSWORD=$1
|
|||
HASH_SHA256=$(echo -n "$PASSWORD" | sha256sum | awk '{print $1}')
|
||||
HASH_BCRYPT=$(python3.7 -c "import bcrypt; print(bcrypt.hashpw(b\"$PASSWORD\", bcrypt.gensalt()).decode(\"ascii\"))")
|
||||
|
||||
# If pass did not change, exit success
|
||||
# If pass did not change and all hash files exist, exit success
|
||||
if [ -f /home/bitcoin/.mynode/.hashedpw ]; then
|
||||
OLD_HASH_SHA256=$(cat /home/bitcoin/.mynode/.hashedpw)
|
||||
if [ "$OLD_HASH_SHA256" = "$HASH_SHA256" ]; then
|
||||
if [ "$OLD_HASH_SHA256" = "$HASH_SHA256" ] && [ -f /home/bitcoin/.mynode/.hashedpw_bcrypt ]; then
|
||||
exit 0;
|
||||
fi
|
||||
fi
|
||||
|
@ -29,6 +29,6 @@ fi
|
|||
|
||||
# Change Thunderhub password
|
||||
if [ -f /mnt/hdd/mynode/thunderhub/thub_config.yaml ]; then
|
||||
sed -i "s/masterPassword:.*/masterPassword: 'thunderhub-$HASH_BCRYPT'/g" /mnt/hdd/mynode/thunderhub/thub_config.yaml
|
||||
sed -i "s#masterPassword:.*#masterPassword: \"thunderhub-$HASH_BCRYPT\"#g" /mnt/hdd/mynode/thunderhub/thub_config.yaml
|
||||
systemctl restart thunderhub &
|
||||
fi
|
|
@ -286,7 +286,7 @@ fi
|
|||
if [ -f /mnt/hdd/mynode/thunderhub/thub_config.yaml ]; then
|
||||
if [ -f /home/bitcoin/.mynode/.hashedpw_bcrypt ]; then
|
||||
HASH_BCRYPT=$(cat /home/bitcoin/.mynode/.hashedpw_bcrypt)
|
||||
sed -i "s/masterPassword:.*/masterPassword: 'thunderhub-$HASH_BCRYPT'/g" /mnt/hdd/mynode/thunderhub/thub_config.yaml
|
||||
sed -i "s#masterPassword:.*#masterPassword: \"thunderhub-$HASH_BCRYPT\"#g" /mnt/hdd/mynode/thunderhub/thub_config.yaml
|
||||
fi
|
||||
fi
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user