Skip to content

Commit

Permalink
fix mosquitto hanging at startup (logfile req) after upgrade v1.4.9 >…
Browse files Browse the repository at this point in the history
… v1.4.10
  • Loading branch information
glynhudson committed Sep 28, 2016
1 parent 621b6dc commit 71f22cd
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions rc.local_jessieminimal
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,20 @@
# Will only run if /var/log is mounted in tmpfs
if ( mount | grep "on /var/log "| grep -q "^tmpfs " )
then
for i in "redis" "apache2" "mysql" "openhab" "logrotate"; do mkdir /var/log/"$i"; done
for i in "redis" "apache2" "mysql" "openhab" "logrotate" "mosquitto"; do mkdir /var/log/"$i"; done
for i in "emoncms.log" "mysql.log" "mqtt_input.log" "redis/redis-server.log" "service-runner.log" "mysql/error.log" "apache2/error.log" ; do touch /var/log/"$i"; done
for i in "emoncms.log" "mysql.log" "mqtt_input.log" "redis/redis-server.log" "service-runner.log" "mysql/error.log" "apache2/error.log" ; do ""chmod 666"" /var/log/"$i"; done
chown -R root:adm /var/log/apache2
chown -R redis:redis /var/log/redis
chown -R mysql:adm /var/log/mysql
chown -R openhab:openhab /var/log/openhab
chown -R pi:pi /var/log/logrotate
chown -R mosquitto:mosquitto /var/log/mosquitto

# Restart Apache & Redis, now the directories are defined
# Restart services,they should run happy now log dir's are created
service apache2 restart
service redis-server restart
service mosquitto restart
fi

# Run emonPi Update of first factory boot (~/data/emonpiupdate.log does not exist)
Expand Down

0 comments on commit 71f22cd

Please sign in to comment.