Skip to content

Commit

Permalink
creat logfiles for dataplicity
Browse files Browse the repository at this point in the history
  • Loading branch information
glynhudson committed May 16, 2017
1 parent fad6524 commit 4d490de
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions rc.local_jessieminimal
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,22 @@
# 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" "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" "ntp_update.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" "ntp_update.log"; do ""chmod 666"" /var/log/"$i"; done
for i in "redis" "apache2" "mysql" "openhab" "logrotate" "mosquitto" "supervisor"; 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" "supervisor/supervisord.log" "ntp_update.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" "supervisor/supervisord.log" "ntp_update.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
chown -R dataplicity:dataplicity /var/log/supervisor;

# Restart services,they should run happy now log dir's are created
service apache2 restart
service redis-server restart
service mosquitto restart
service supervisor restart
fi

# Run emonPi Update of first factory boot as Pi user (run condition > web connection exisits && ~/data/emonpiupdate.log does not exist)
Expand Down

0 comments on commit 4d490de

Please sign in to comment.