mirror of
https://github.com/mynodebtc/mynode.git
synced 2024-12-25 14:08:07 +00:00
Consolidate scripts folders for dynamic apps
This commit is contained in:
parent
b27ad0ccf2
commit
5ef6fc2442
|
@ -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/service_post/post_bitcoin.sh
|
||||
ExecStartPost=+/usr/bin/service_scripts/post_bitcoin.sh
|
||||
PIDFile=/home/bitcoin/.bitcoin/bitcoin.pid
|
||||
User=bitcoin
|
||||
Group=bitcoin
|
||||
|
|
|
@ -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/service_pre/pre_btcrpcexplorer.sh
|
||||
ExecStartPre=+/usr/bin/service_scripts/pre_btcrpcexplorer.sh
|
||||
WorkingDirectory=/opt/mynode/btc-rpc-explorer
|
||||
ExecStart=/usr/bin/npm start
|
||||
|
||||
|
|
|
@ -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/service_pre/pre_corsproxy.sh
|
||||
ExecStartPre=/usr/bin/service_scripts/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
|
||||
|
|
|
@ -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/service_pre/pre_lnbits.sh
|
||||
ExecStartPre=/usr/bin/service_scripts/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'
|
||||
|
|
|
@ -8,7 +8,7 @@ After=bitcoin.service
|
|||
|
||||
[Service]
|
||||
ExecStartPre=/usr/bin/is_not_shutting_down.sh
|
||||
ExecStartPre=/usr/bin/service_pre/pre_lnd.sh
|
||||
ExecStartPre=/usr/bin/service_scripts/pre_lnd.sh
|
||||
ExecStartPre=/usr/bin/wait_on_bitcoin.sh
|
||||
ExecStartPre=+/usr/bin/mynode_gen_lnd_config.sh
|
||||
ExecStart=/usr/local/bin/lnd
|
||||
|
|
|
@ -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/service_pre/pre_mempool.sh
|
||||
ExecStartPre=/usr/bin/service_scripts/pre_mempool.sh
|
||||
ExecStart=/usr/local/bin/docker-compose up
|
||||
ExecStartPost=/usr/bin/service_post/post_mempool.sh
|
||||
ExecStartPost=/usr/bin/service_scripts/post_mempool.sh
|
||||
|
||||
ExecStop=/usr/local/bin/docker-compose down
|
||||
|
||||
|
|
|
@ -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/service_pre/pre_rtl.sh
|
||||
ExecStartPre=+/usr/bin/service_scripts/pre_rtl.sh
|
||||
WorkingDirectory=/opt/mynode/RTL
|
||||
ExecStart=/usr/bin/node rtl
|
||||
|
||||
|
|
|
@ -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/service_pre/pre_specter.sh
|
||||
ExecStartPre=/usr/bin/service_scripts/pre_specter.sh
|
||||
WorkingDirectory=/opt/mynode/specter
|
||||
Environment="SPECTER_API_ACTIVE=True"
|
||||
|
||||
|
|
|
@ -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/service_pre/pre_sphinxrelay.sh
|
||||
ExecStartPre=+/usr/bin/service_scripts/pre_sphinxrelay.sh
|
||||
WorkingDirectory=/opt/mynode/sphinxrelay
|
||||
ExecStart=npm run prod
|
||||
|
||||
|
|
|
@ -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/service_pre/pre_whirlpool.sh
|
||||
ExecStartPre=/usr/bin/service_scripts/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
|
||||
|
|
|
@ -198,7 +198,7 @@ while true; do
|
|||
fi
|
||||
|
||||
#Check for install/upgrade to finish to initialize Dojo mysql db
|
||||
sudo /usr/bin/service_post/post_dojo.sh
|
||||
sudo /usr/bin/service_scripts/post_dojo.sh
|
||||
|
||||
# Wait for install script to finish
|
||||
wait $INSTALL_PID || MARK_DOJO_COMPLETE=0
|
||||
|
|
|
@ -8,9 +8,9 @@ After=www.service docker_images.service
|
|||
|
||||
[Service]
|
||||
ExecStartPre=/usr/bin/is_not_shutting_down.sh
|
||||
ExecStartPre=/bin/bash -c 'if [ -f /usr/bin/service_pre/pre_lndg.sh ]; then /bin/bash /usr/bin/service_pre/pre_lndg.sh; fi'
|
||||
ExecStartPre=/bin/bash -c 'if [ -f /usr/bin/service_scripts/pre_lndg.sh ]; then /bin/bash /usr/bin/service_scripts/pre_lndg.sh; fi'
|
||||
ExecStart=/usr/bin/docker run --rm --name webssh2 -p 2222:2222 -v /opt/mynode/webssh2/config.json:/usr/src/config.json webssh2
|
||||
ExecStartPost=/bin/bash -c 'if [ -f /usr/bin/service_post/post_lndg.sh ]; then /bin/bash /usr/bin/service_post/post_lndg.sh; fi'
|
||||
ExecStartPost=/bin/bash -c 'if [ -f /usr/bin/service_scripts/post_lndg.sh ]; then /bin/bash /usr/bin/service_scripts/post_lndg.sh; fi'
|
||||
ExecStop=/usr/bin/docker stop -t 2 webssh2
|
||||
|
||||
# Need new user
|
||||
|
|
|
@ -461,13 +461,13 @@ def init_dynamic_app(app_info):
|
|||
os.system("cp -f {} {}".format(app_dir+"/app.service", "/etc/systemd/system/"+app_name+".service"))
|
||||
os.system("cp -f {} {}".format(app_dir+"/"+app_name+".png", "/var/www/mynode/static/images/app_icons/"+app_name+".png"))
|
||||
if (os.path.isfile(app_dir+"/scripts/pre_"+app_name+".sh")):
|
||||
os.system("cp -f {} {}".format(app_dir+"/scripts/pre_"+app_name+".sh", "/usr/bin/service_post/pre_"+app_name+".sh"))
|
||||
os.system("cp -f {} {}".format(app_dir+"/scripts/pre_"+app_name+".sh", "/usr/bin/service_scripts/pre_"+app_name+".sh"))
|
||||
if (os.path.isfile(app_dir+"/scripts/post_"+app_name+".sh")):
|
||||
os.system("cp -f {} {}".format(app_dir+"/scripts/post_"+app_name+".sh", "/usr/bin/service_pre/post_"+app_name+".sh"))
|
||||
os.system("cp -f {} {}".format(app_dir+"/scripts/post_"+app_name+".sh", "/usr/bin/service_scripts/post_"+app_name+".sh"))
|
||||
if (os.path.isfile(app_dir+"/scripts/install"+app_name+".sh")):
|
||||
os.system("cp -f {} {}".format(app_dir+"/scripts/install_"+app_name+".sh", "/usr/bin/service_install/install_"+app_name+".sh"))
|
||||
os.system("cp -f {} {}".format(app_dir+"/scripts/install_"+app_name+".sh", "/usr/bin/service_scripts/install_"+app_name+".sh"))
|
||||
if (os.path.isfile(app_dir+"/scripts/uninstall"+app_name+".sh")):
|
||||
os.system("cp -f {} {}".format(app_dir+"/scripts/uninstall"+app_name+".sh", "/usr/bin/service_uninstall/uninstall_"+app_name+".sh"))
|
||||
os.system("cp -f {} {}".format(app_dir+"/scripts/uninstall"+app_name+".sh", "/usr/bin/service_scripts/uninstall_"+app_name+".sh"))
|
||||
|
||||
log_message(" TODO: Install data files")
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user