Skip to content

Commit

Permalink
create openhab2 log folders
Browse files Browse the repository at this point in the history
  • Loading branch information
glynhudson authored Dec 6, 2018
1 parent eca5446 commit ac0846f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion stretch/rc.local
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,14 @@ hostname -I
# 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" "supervisor"; do mkdir /var/log/"$i"; done
for i in "redis" "apache2" "mysql" "openhab" "openhab2" "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 openhab:openhab /var/log/openhab2
chown -R pi:pi /var/log/logrotate
chown -R mosquitto:mosquitto /var/log/mosquitto
chown -R dataplicity:dataplicity /var/log/supervisor;
Expand Down

0 comments on commit ac0846f

Please sign in to comment.