Skip to content

Commit

Permalink
Add log to logrotation.
Browse files Browse the repository at this point in the history
Added log to logrotation.
  • Loading branch information
tmiland committed Nov 9, 2019
1 parent b6eba82 commit 95ba893
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion invidious_update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#### Maintained by @tmiland ####
######################################################################

version='1.4.0' # Must stay on line 14 for updater to fetch the numbers
version='1.4.1' # Must stay on line 14 for updater to fetch the numbers

#------------------------------------------------------------------------------#
#
Expand Down Expand Up @@ -745,6 +745,22 @@ systemd_install() {
fi
}

logrotate_install() {
if [ -d /etc/logrotate.d ]; then
echo "Adding logrotate configuration..."
echo "/home/invidious/invidious/invidious.log {
rotate 4
weekly
notifempty
missingok
compress
minsize 1048576
}" | ${SUDO} tee /etc/logrotate.d/invidious.logrotate
chmod 0644 /etc/logrotate.d/invidious.logrotate
echo " (done)"
fi
}

# Get Crystal
get_crystal() {
if [[ $(lsb_release -si) == "Debian" || $(lsb_release -si) == "Ubuntu" ]]; then
Expand Down Expand Up @@ -1110,6 +1126,8 @@ host replication all ::1/128 md5" | ${SUDO} t

systemd_install

logrotate_install

show_install_banner

sleep 5
Expand Down

0 comments on commit 95ba893

Please sign in to comment.