set logs on siad services

This commit is contained in:
Karol Wypchlo 2020-03-12 15:24:35 +01:00
parent bde39400ae
commit 4e5aca4998
3 changed files with 12 additions and 3 deletions

View File

@ -80,7 +80,10 @@ To stop it: `systemctl --user stop siad`
To check the status of it: `systemctl --user status siad`
To check standard err/standard out: `journalctl --user-unit siad`
To check standard err/standard out: `journalctl --user-unit siad`. In addition you can add:
- `-r` to view journal from the newest entry
- `-f` to follow and `-n INTEGER` to specify number of lines
## Portal Setup

View File

@ -5,9 +5,12 @@ Description=siad-upload
Type=simple
WorkingDirectory=/home/user/siad-upload
EnvironmentFile=/home/user/.sia/sia-upload.env
ExecStart=/home/user/go/bin/siad --api-addr "localhost:9970" --host-addr ":9972" --rpc-addr ":9971"
ExecStop=/home/user/go/bin/siac --api-addr "localhost:9970" --host-addr ":9972" --rpc-addr ":9971" stop
ExecStart=/home/user/go/bin/siad --api-addr "localhost:9970" --rpc-addr ":9971" --host-addr ":9972"
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

View File

@ -8,6 +8,9 @@ EnvironmentFile=/home/user/.sia/sia.env
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