Combine stdout and stderr into one logfile

This commit is contained in:
Daniel Karzel 2021-02-24 10:14:27 +11:00
parent 0ebc9a79c7
commit 85704d18f8
2 changed files with 5 additions and 6 deletions

View File

@ -1,6 +1,5 @@
[Unit]
Description=Pull and build ASB from source
After=start-asb.service
Wants=pull-and-build-asb.timer
[Service]
@ -8,9 +7,9 @@ Type=oneshot
WorkingDirectory=/var/external/asb/xmr-btc-swap
ExecStartPre=git pull
ExecStart=/home/asb/.cargo/bin/cargo build --release --bin asb
ExecStopPost=ExecStopPost=/bin/sh -c 'if [ "$$EXIT_STATUS" -ne 0 ]; then /usr/local/bin/systemd-email.sh daniel@coblox.tech %n; fi'
StandardOutput=append:/var/external/asb/run/logs/log_pull-build_stdout.log
StandardError=append:/var/external/asb/run/logs/log_pull-build_stderr.log
ExecStopPost=/bin/sh -c 'if [ "$$EXIT_STATUS" -ne 0 ]; then /usr/local/bin/systemd-email.sh daniel@coblox.tech %n; fi'
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

@ -6,8 +6,8 @@ After=start-monero-wallet-rpc.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
ExecStopPost=/bin/sh -c 'if [ "$$EXIT_STATUS" -ne 0 ]; then /usr/local/bin/systemd-email.sh daniel@coblox.tech %n; fi'
StandardOutput=append:/var/external/asb/run/logs/log_stdout.log
StandardError=append:/var/external/asb/run/logs/log_stderr.log
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