Skip to content

Commit f1b566c

Browse files
committed
Added logrotate
1 parent ffd026a commit f1b566c

File tree

3 files changed

+16
-1
lines changed

3 files changed

+16
-1
lines changed

logrotate-ntripcaster.service

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[Unit]
2+
Description=Rotate and Compress ntripcaster Logs
3+
4+
[Service]
5+
ExecStart=/usr/sbin/logrotate /usr/local/ntripcaster/ntripcaster.logrotate
6+

ntripcaster.logrotate

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
/tmp/ntripcaster.log {
2+
su root root
3+
copytruncate
4+
size 10M
5+
rotate 2
6+
nocompress
7+
}

update.sh

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
#!/bin/bash
22

33
cp ntripcaster.conf /usr/local/ntripcaster/
4+
cp ntripcaster.logrotate /usr/local/ntripcaster/
45

56
cp *.service /etc/systemd/system
67
systemctl daemon-reload
78

89
systemctl try-restart ntripcaster.service
9-
systemctl try-restart str2str
10+
systemctl try-restart str2str.service
11+
systemctl try-restart logrotate-ntripcaster.service

0 commit comments

Comments
 (0)