From 517e3dcafcb14e1fd81f862ad49102ad0fb54a39 Mon Sep 17 00:00:00 2001 From: Starbeamrainbowlabs Date: Mon, 4 Feb 2019 13:54:21 +0000 Subject: [PATCH] Update systemd config to optionally use rsyslog --- rhinoreminds-rsyslog.conf | 2 ++ rhinoreminds.service | 5 +++++ 2 files changed, 7 insertions(+) create mode 100644 rhinoreminds-rsyslog.conf diff --git a/rhinoreminds-rsyslog.conf b/rhinoreminds-rsyslog.conf new file mode 100644 index 0000000..000d9f4 --- /dev/null +++ b/rhinoreminds-rsyslog.conf @@ -0,0 +1,2 @@ +if $programname == 'rhinoreminds' then /var/log/rhinoreminds/rhinoreminds.log +if $programname == 'rhinoreminds' then ~ diff --git a/rhinoreminds.service b/rhinoreminds.service index e3226d5..cced202 100644 --- a/rhinoreminds.service +++ b/rhinoreminds.service @@ -12,5 +12,10 @@ ExecStart=/srv/rhinoreminds/start_service.sh Restart=on-failure # Other Restart options: or always, on-abort, etc +# If you want logs to be kept automatically in /var/log, uncomment the following & copy "rhinoreminds-rsyslog.conf" in the root of this repository to "/etc/rsyslog.d" - and then do `sudo systemctl restart rsyslog.d` +#StandardOutput=syslog +#StandardError=syslog +#SyslogIdentifier=rhinoreminds + [Install] WantedBy=multi-user.target