Rename, log to journal, monerod service

This commit is contained in:
Daniel Karzel 2021-03-09 17:20:58 +11:00
parent f87bdca3ec
commit 70a90241cc
7 changed files with 24 additions and 7 deletions

View File

@ -8,8 +8,6 @@ Type=oneshot
WorkingDirectory=/var/external/asb/xmr-btc-swap
ExecStartPre=git pull
ExecStart=/home/asb/.cargo/bin/cargo build --release --bin asb
StandardOutput=append:/var/external/asb/run/logs/pull-and-build.log
StandardError=append:/var/external/asb/run/logs/pull-and-build.log
User=asb
Group=asb

View File

@ -2,7 +2,8 @@
Description=triggers the service that pulls and builds asb
[Timer]
OnCalendar=16:00
# 6am GMT = 5pm AEDT
OnCalendar=6:00
Persistent=true
[Install]

View File

@ -6,6 +6,8 @@ OnFailure=unit-status-email@%n.service
[Service]
Type=oneshot
ExecStart=/usr/bin/systemctl restart start-asb.service
# notify upon restart to know that the service was restarted
ExecStartPost=/usr/bin/bash -c '/usr/local/bin/systemd-email.sh daniel@coblox.tech %n'
[Install]
WantedBy=multi-user.target

View File

@ -6,8 +6,6 @@ OnFailure=unit-status-email@%n.service
[Service]
WorkingDirectory=/var/external/asb/xmr-btc-swap
ExecStart=/home/asb/.cargo/bin/cargo run --release --bin asb -- --config /var/external/asb/run/asb-config/config.toml start
StandardOutput=append:/var/external/asb/run/logs/start-asb.log
StandardError=append:/var/external/asb/run/logs/start-asb.log
Restart=on-failure
User=asb
Group=asb

View File

@ -1,10 +1,11 @@
[Unit]
Description=monero-wallet-rpc for the automated swap backend (asb)
After=network.target
Requires=start-monerod.service
OnFailure=unit-status-email@%n.service
[Service]
ExecStart=/var/external/asb/monero/bin/monero-wallet-rpc --stagenet --daemon-host stagenet.community.xmr.to --rpc-bind-port 38083 --disable-rpc-login --wallet-dir /var/external/asb/monero/data/stagenet/asb-wallets
Type=simple
ExecStart=/var/external/asb/monero/bin/monero-wallet-rpc --stagenet --daemon-address 127.0.0.1:38081 --rpc-bind-port 38083 --disable-rpc-login --wallet-dir /var/external/asb/monero/data/stagenet/asb-wallets
ExecStartPost=/usr/bin/bash -c "i=1; while [ $i -ne 0 ]; do tail -n1 /var/external/asb/monero/bin/monero-wallet-rpc.log | grep 'Starting wallet RPC server'; i=$?; sleep 5; done"
Restart=always
User=asb

View File

@ -0,0 +1,17 @@
[Unit]
Description=monerod for the automated swap backend (asb)
After=network.target
OnFailure=unit-status-email@%n.service
[Service]
Type=simple
ExecStart=/var/external/asb/monero/bin/monerod --stagenet --data-dir /var/external/asb/monero/data/stagenet/monerod --non-interactive
# ExecStartPost=/usr/bin/bash -c "i=1; while [ $i -ne 0 ]; do cat /var/external/asb/monero/bin/monerod.log | grep 'core RPC server started ok'; i=$?; sleep 1; done"
# StandardOutput=append:/var/external/asb/monero/bin/monerod.log
# StandardError=append:/var/external/asb/monero/bin/monerod.log
Restart=always
User=asb
Group=asb
[Install]
WantedBy=multi-user.target