Commit df2930af by John Donnal

added nilmdb-fsck service and update docs with journal data info

parent a55193f9
......@@ -28,6 +28,11 @@ Use the Puppet repository to install the complete Wattsworth stack
Here is info about Joule and the Web Frontend
Another edit
Make sure you set up data journaling on the nilmdb partition:
UUID=XXX / ext4 errors=remount-ro,data=journal 0
sudo tune2fs -o journal_data /dev/sda2
.. toctree::
:maxdepth: 2
......
[Unit]
Description=check and repair nilmdb database
Before=apache2.service
[Service]
Type=oneshot
StandardOutput=journal
ExecStart = /usr/local/bin/nilmdb-fsck -f -n /opt/nilmdb/db
[Install]
WantedBy=multi-user.target
\ No newline at end of file
......@@ -37,6 +37,7 @@ class nilmdb {
group => root,
mode => '0644',
}
exec{'a2ensite 10-nilmdb.conf':
creates => '/etc/apache2/sites-enabled/10-nilmdb.conf',
path => ['/usr/sbin','/usr/bin'],
......@@ -67,6 +68,19 @@ class nilmdb {
source => 'puppet:///modules/nilmdb/nilmdb.wsgi',
notify => Exec['nilmdb_restart_apache']
}
file{'/etc/systemd/system/nilmdb-fsck.service':
ensure => present,
owner => root,
group => root,
mode => '0644',
source => 'puppet:///modules/nilmdb/nilmdb-fsck.service',
notify => Exec['install_nilmdb_fsck_service']
}
exec{'install_nilmdb_fsck_service':
command => '/bin/systemctl enable nilmdb-fsck.service',
refreshonly => true,
}
#mod_wsgi tries to access user home directory
#nilmdb is a system account but just create a stub
#directory to satisfy wsgi :P
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment