kopia lustrzana https://github.com/cyoung/stratux
Add logrotate conf. Keep two days of logs. Run logrotate on boot.
rodzic
a3fda2aa3c
commit
bd10be4f63
|
@ -0,0 +1,32 @@
|
||||||
|
# see "man logrotate" for details
|
||||||
|
# rotate log files weekly
|
||||||
|
daily
|
||||||
|
|
||||||
|
# keep 2 days worth of backlogs
|
||||||
|
rotate 2
|
||||||
|
|
||||||
|
# create new (empty) log files after rotating old ones
|
||||||
|
create
|
||||||
|
|
||||||
|
# uncomment this if you want your log files compressed
|
||||||
|
compress
|
||||||
|
|
||||||
|
# packages drop log rotation information into this directory
|
||||||
|
include /etc/logrotate.d
|
||||||
|
|
||||||
|
# no packages own wtmp, or btmp -- we'll rotate them here
|
||||||
|
/var/log/wtmp {
|
||||||
|
missingok
|
||||||
|
monthly
|
||||||
|
create 0664 root utmp
|
||||||
|
rotate 1
|
||||||
|
}
|
||||||
|
|
||||||
|
/var/log/btmp {
|
||||||
|
missingok
|
||||||
|
monthly
|
||||||
|
create 0660 root utmp
|
||||||
|
rotate 1
|
||||||
|
}
|
||||||
|
|
||||||
|
# system-specific logs may be configured here
|
|
@ -61,6 +61,9 @@ chmod 755 mnt/usr/sbin/sdr-tool.sh
|
||||||
#ping udev
|
#ping udev
|
||||||
cp -f 99-uavionix.rules mnt/etc/udev/rules.d
|
cp -f 99-uavionix.rules mnt/etc/udev/rules.d
|
||||||
|
|
||||||
|
#logrotate conf
|
||||||
|
cp -f logrotate.conf mnt/etc/logrotate.conf
|
||||||
|
|
||||||
#fan/temp control script
|
#fan/temp control script
|
||||||
#remove old script
|
#remove old script
|
||||||
rm -rf mnt/usr/bin/fancontrol.py
|
rm -rf mnt/usr/bin/fancontrol.py
|
||||||
|
|
|
@ -17,6 +17,13 @@ if [ "$_IP" ]; then
|
||||||
printf "My IP address is %s\n" "$_IP"
|
printf "My IP address is %s\n" "$_IP"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
#
|
||||||
|
# Rotate logs on boot.
|
||||||
|
#
|
||||||
|
/usr/sbin/logrotate /etc/logrotate.conf
|
||||||
|
|
||||||
|
|
||||||
/usr/bin/stratux-screen.py start
|
/usr/bin/stratux-screen.py start
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
|
|
@ -39,6 +39,7 @@ cp image/stratux-wifi.sh work/bin/
|
||||||
cp image/rc.local work/bin/
|
cp image/rc.local work/bin/
|
||||||
cp image/dhcpd.conf work/bin/
|
cp image/dhcpd.conf work/bin/
|
||||||
cp image/interfaces work/bin/
|
cp image/interfaces work/bin/
|
||||||
|
cp image/logrotate.conf work/bin
|
||||||
|
|
||||||
#TODO: librtlsdr.
|
#TODO: librtlsdr.
|
||||||
cd work/
|
cd work/
|
||||||
|
|
|
@ -23,6 +23,9 @@ ln -fs /lib/systemd/system/stratux.service /etc/systemd/system/multi-user.target
|
||||||
cp -f hostapd.conf /etc/hostapd/hostapd.conf
|
cp -f hostapd.conf /etc/hostapd/hostapd.conf
|
||||||
cp -f hostapd-edimax.conf /etc/hostapd/hostapd-edimax.conf
|
cp -f hostapd-edimax.conf /etc/hostapd/hostapd-edimax.conf
|
||||||
|
|
||||||
|
#logrotate config
|
||||||
|
cp -f logrotate.conf /etc/logrotate.conf
|
||||||
|
|
||||||
#WiFi Hostapd ver test and hostapd.conf builder script
|
#WiFi Hostapd ver test and hostapd.conf builder script
|
||||||
cp -f stratux-wifi.sh /usr/sbin/
|
cp -f stratux-wifi.sh /usr/sbin/
|
||||||
|
|
||||||
|
|
Ładowanie…
Reference in New Issue