Move pre and post service scripts

This commit is contained in:
Taylor Helsper 2022-02-12 21:59:04 -06:00
parent 6c1b62feff
commit e97359e19b
24 changed files with 15 additions and 14 deletions

View File

@ -12,7 +12,7 @@ ExecStartPre=/bin/sh -c 'cat /mnt/hdd/mynode/quicksync/.quicksync_complete'
ExecStartPre=+/usr/bin/mynode_gen_bitcoin_config.sh
EnvironmentFile=/mnt/hdd/mynode/bitcoin/env
ExecStart=/usr/local/bin/bitcoind -daemon $BTCARGS -deprecatedrpc=accounts -par=-1 -conf=/home/bitcoin/.bitcoin/bitcoin.conf -printtoconsole -pid=/home/bitcoin/.bitcoin/bitcoin.pid
ExecStartPost=+/usr/bin/mynode_post_bitcoin.sh
ExecStartPost=+/usr/bin/service_post/post_bitcoin.sh
PIDFile=/home/bitcoin/.bitcoin/bitcoin.pid
User=bitcoin
Group=bitcoin

View File

@ -10,7 +10,7 @@ After=bitcoin.service
ExecStartPre=/usr/bin/is_not_shutting_down.sh
ExecStartPre=/usr/bin/wait_on_bitcoin.sh
ExecStartPre=/usr/bin/wait_on_electrs.sh
ExecStartPre=+/usr/bin/mynode_pre_btcrpcexplorer.sh
ExecStartPre=+/usr/bin/service_pre/pre_btcrpcexplorer.sh
WorkingDirectory=/opt/mynode/btc-rpc-explorer
ExecStart=/usr/bin/npm start

View File

@ -9,7 +9,7 @@ After=bitcoin.service
[Service]
ExecStartPre=/usr/bin/is_not_shutting_down.sh
ExecStartPre=/usr/bin/wait_on_bitcoin.sh
ExecStartPre=/usr/bin/mynode_pre_corsproxy.sh
ExecStartPre=/usr/bin/service_pre/pre_corsproxy.sh
WorkingDirectory=/opt/mynode/corsproxy
Environment="CORSPROXY_PORT=8335" "CORSPROXY_HOST=0.0.0.0" "CORSPROXY_TARGET=localhost:8332" "CORSPROXY_USE_HTTPS=true" "CORSPROXY_HTTPS_KEY=/home/bitcoin/.mynode/https/myNode.local.key" "CORSPROXY_HTTPS_CERT=/home/bitcoin/.mynode/https/myNode.local.crt"
ExecStart=/usr/bin/npm start

View File

@ -10,7 +10,7 @@ After=bitcoin.service lnd.service
ExecStartPre=/usr/bin/is_not_shutting_down.sh
ExecStartPre=/usr/bin/is_mainnet.sh
ExecStartPre=/usr/bin/wait_on_lnd.sh
ExecStartPre=/usr/bin/mynode_pre_lnbits.sh
ExecStartPre=/usr/bin/service_pre/pre_lnbits.sh
#ExecStartPre=/bin/sh -c 'cd /opt/mynode/lnbits && /usr/local/bin/pipenv run flask migrate'
ExecStartPre=/bin/sh -c 'cd /opt/mynode/lnbits && ./lnbits_venv/bin/quart migrate'

View File

@ -8,7 +8,7 @@ After=bitcoin.service
[Service]
ExecStartPre=/usr/bin/is_not_shutting_down.sh
ExecStartPre=/usr/bin/pre_lnd.sh
ExecStartPre=/usr/bin/service_pre/pre_lnd.sh
ExecStartPre=/usr/bin/wait_on_bitcoin.sh
ExecStartPre=+/usr/bin/mynode_gen_lnd_config.sh
ExecStart=/usr/local/bin/lnd

View File

@ -12,9 +12,9 @@ EnvironmentFile=/mnt/hdd/mynode/settings/.btcrpc_environment
ExecStartPre=/usr/bin/is_not_shutting_down.sh
ExecStartPre=/usr/bin/wait_on_bitcoin.sh
ExecStartPre=/usr/bin/wait_on_docker_image_install.sh
ExecStartPre=/usr/bin/mynode_pre_mempool.sh
ExecStartPre=/usr/bin/service_pre/pre_mempool.sh
ExecStart=/usr/local/bin/docker-compose up
ExecStartPost=/usr/bin/mynode_post_mempool.sh
ExecStartPost=/usr/bin/service_post/post_mempool.sh
ExecStop=/usr/local/bin/docker-compose down

View File

@ -9,7 +9,7 @@ After=bitcoin.service
[Service]
ExecStartPre=/usr/bin/is_not_shutting_down.sh
ExecStartPre=/usr/bin/wait_on_lnd.sh
ExecStartPre=+/usr/bin/mynode_pre_rtl.sh
ExecStartPre=+/usr/bin/service_pre/pre_rtl.sh
WorkingDirectory=/opt/mynode/RTL
ExecStart=/usr/bin/node rtl

View File

@ -9,7 +9,7 @@ After=bitcoin.service
[Service]
ExecStartPre=/usr/bin/is_not_shutting_down.sh
ExecStartPre=/usr/bin/mynode_gen_cert.sh specter 825
ExecStartPre=/usr/bin/mynode_pre_specter.sh
ExecStartPre=/usr/bin/service_pre/pre_specter.sh
WorkingDirectory=/opt/mynode/specter
Environment="SPECTER_API_ACTIVE=True"

View File

@ -9,7 +9,7 @@ After=lnd.service
[Service]
ExecStartPre=/usr/bin/is_not_shutting_down.sh
ExecStartPre=/usr/bin/wait_on_lnd.sh
ExecStartPre=+/usr/bin/mynode_pre_sphinxrelay.sh
ExecStartPre=+/usr/bin/service_pre/pre_sphinxrelay.sh
WorkingDirectory=/opt/mynode/sphinxrelay
ExecStart=npm run prod

View File

@ -7,7 +7,7 @@ WorkingDirectory=/mnt/hdd/mynode/whirlpool
ExecStartPre=/usr/bin/is_not_shutting_down.sh
ExecStartPre=/usr/bin/is_mainnet.sh
ExecStartPre=/usr/bin/wait_on_bitcoin.sh
ExecStartPre=/usr/bin/mynode_pre_whirlpool.sh
ExecStartPre=/usr/bin/service_pre/pre_whirlpool.sh
ExecStart=/usr/bin/java -jar /opt/mynode/whirlpool/whirlpool.jar --server=mainnet --resync --tor --auto-mix --mixs-target=3 --listen
User=bitcoin
Group=bitcoin

View File

@ -198,7 +198,7 @@ while true; do
fi
#Check for install/upgrade to finish to initialize Dojo mysql db
sudo /usr/bin/mynode_post_dojo.sh
sudo /usr/bin/service_post/post_dojo.sh
# Wait for install script to finish
wait $INSTALL_PID || MARK_DOJO_COMPLETE=0

View File

@ -380,7 +380,7 @@ if [ $IS_RASPI4 -eq 1 ]; then
fi
# RTL config
# Moved to mynode_pre_rtl.sh
# Moved to pre_rtl.sh
# BTCPay Server Setup
mkdir -p /opt/mynode/btcpayserver
@ -488,7 +488,7 @@ fi
chown -R joinmarket:joinmarket /mnt/hdd/mynode/joinmarket
# Setup Mempool
# Moved to mynode_pre_mempool.sh
# Moved to pre_mempool.sh
# Setup Netdata
mkdir -p /opt/mynode/netdata
@ -753,6 +753,7 @@ systemctl enable check_in || true
systemctl enable bitcoin || true # Make sure new bitcoin service is used
systemctl disable bitcoind || true # Make sure new bitcoin service is used
rm /etc/systemd/system/bitcoind.service || true # Make sure new bitcoin service is used
systemctl daemon-reload || true
if [ -f /usr/share/joininbox/menu.update.sh ] && [ -f /home/joinmarket/menu.update.sh ]; then
sudo -u joinmarket cp -f /usr/share/joininbox/menu.update.sh /home/joinmarket/menu.update.sh
fi