Skip to content

Commit

Permalink
fix logrotate permissions
Browse files Browse the repository at this point in the history
  • Loading branch information
TrystanLea committed Jul 6, 2020
1 parent 984d9c9 commit 46cf535
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
1 change: 0 additions & 1 deletion update/emonhub.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ if [ -d $openenergymonitor_dir/emonhub ]; then
# Temporary addition of paho-mqtt & requests here
# remove once issue has cleared:
# https://community.openenergymonitor.org/t/emonpi-new-sd-image-emonhub-failing/14578
sudo apt update
sudo apt-get install -y python3-serial python3-configobj python3-pip
sudo pip3 install paho-mqtt requests
fi
Expand Down
9 changes: 9 additions & 0 deletions update/main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ if [ "$EUID" = "0" ] ; then
exit 0
fi

if [ "$type" == "all" ] || [ "$type" == "emonhub" ]; then
echo "Running apt-get update"
sudo apt-get update
fi

if [ "$emonSD_pi_env" = "1" ]; then
# Check if we have an emonpi LCD connected,
# if we do assume EmonPi hardware else assume RFM69Pi
Expand All @@ -47,6 +52,10 @@ if [ "$emonSD_pi_env" = "1" ]; then
echo "Display update message on LCD"
sudo $openenergymonitor_dir/emonpi/lcd/./emonPiLCD_update.py
fi

# Ensure logrotate configuration has correct permissions
sudo chown root:pi $openenergymonitor_dir/EmonScripts/defaults/etc/logrotate.d/*

fi

# -----------------------------------------------------------------
Expand Down

1 comment on commit 46cf535

@borpin
Copy link
Contributor

@borpin borpin commented on 46cf535 Jul 6, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There was a suggestion to look for large log files and delete them to ensure there is enough space.

Please sign in to comment.