From ccddff4b6a189fbc5010ec770096db8ffc09e8b8 Mon Sep 17 00:00:00 2001 From: Marcin Jachymiak Date: Fri, 13 Mar 2020 12:34:42 -0400 Subject: [PATCH] Use journald with persistence --- setup-scripts/journald.conf | 2 ++ setup-scripts/setup.sh | 5 +++++ setup-scripts/siad-upload.service | 2 -- setup-scripts/siad.service | 2 -- 4 files changed, 7 insertions(+), 4 deletions(-) create mode 100644 setup-scripts/journald.conf diff --git a/setup-scripts/journald.conf b/setup-scripts/journald.conf new file mode 100644 index 00000000..21dfde0a --- /dev/null +++ b/setup-scripts/journald.conf @@ -0,0 +1,2 @@ +[Journal] +Storage=persistent diff --git a/setup-scripts/setup.sh b/setup-scripts/setup.sh index f4740abd..6cfc6740 100755 --- a/setup-scripts/setup.sh +++ b/setup-scripts/setup.sh @@ -75,3 +75,8 @@ cp siad-upload.service ~/.config/systemd/user/siad-upload.service mkdir -p ~/.sia cp sia.env ~/.sia/ cp sia.env ~/.sia/sia-upload.env + +# Setup persistent journal +sudo mkdir -p /var/log/journal +sudo cp journald.conf /etc/systemd/journald.conf +sudo systemctl restart systemd-journald diff --git a/setup-scripts/siad-upload.service b/setup-scripts/siad-upload.service index 8aac3d00..c6fe6a88 100644 --- a/setup-scripts/siad-upload.service +++ b/setup-scripts/siad-upload.service @@ -9,8 +9,6 @@ ExecStart=/home/user/go/bin/siad --api-addr "localhost:9970" --rpc-addr ":9971" ExecStop=/home/user/go/bin/siac --addr "localhost:9970" stop Restart=on-failure SyslogIdentifier=siad-upload -StandardOutput=file:/home/user/siad-upload/output.log -StandardError=file:/home/user/siad-upload/error.log [Install] WantedBy=default.target diff --git a/setup-scripts/siad.service b/setup-scripts/siad.service index 4a386dd9..83207c79 100644 --- a/setup-scripts/siad.service +++ b/setup-scripts/siad.service @@ -9,8 +9,6 @@ ExecStart=/home/user/go/bin/siad ExecStop=/home/user/go/bin/siac stop Restart=on-failure SyslogIdentifier=siad -StandardOutput=file:/home/user/siad/output.log -StandardError=file:/home/user/siad/error.log [Install] WantedBy=default.target