Commit 43f04fc3 by source_reader

added nilmdb-fsck to nilmdb start

parent 4c5ea6a1
......@@ -29,10 +29,13 @@ history -c
rm -rf /root/puppet
rm -rf /root/.joule
rm -rf ~/.joule
echo "6] Removing puppet"
sudo apt remove puppet-agent
echo "From cubic remove the ubuntu user with [deluser --remove-home ubuntu]"
deluser systemd-coredump
echo "If any user shows up below delete with deluser command:"
history -c
cat /etc/passwd | grep 999
echo "From cubic remove the ubuntu user with [deluser --remove-home ubuntu]"
history -c
......@@ -74,6 +74,7 @@ http {
server{
listen 443 ssl;
set $subdomain_apps false; # set to true to enable subdomains (requires servern_name to be set as well)
include /etc/nginx/docs.conf;
include /etc/nginx/lumen.conf;
include /etc/nginx/joule.conf;
<% if @nilmdb == true -%>
......
......@@ -4,7 +4,7 @@ Description=NilmDB time series database
[Service]
Restart = always
StandardOutput=journal
#ExecStartPre = /usr/local/bin/nilmdb-fsck -f -n /opt/data
ExecStartPre = /bin/bash -c "if [[ -f /opt/data/data.sql ]] ; then /usr/local/bin/nilmdb-fsck -f -n /opt/data; else echo firstrun; fi"
ExecStart = /usr/local/bin/uwsgi --ini /etc/nilmdb/nilmdb.ini
KillSignal = SIGQUIT
......
......@@ -17,7 +17,7 @@ class nilmdb::install{
$pip_cmd="pip3 install --upgrade --extra-index-url ${pip_url}"
exec{'install_nilmdb':
command => "${pip_cmd} nilmdb",
command => "${pip_cmd} nilmdb nilmtools",
timeout => 0,
path => ['/usr/local/bin','/usr/bin'],
require => Package[$pip_pkgs]
......
......@@ -79,7 +79,8 @@ EOF
echo "7] Enabling first_boot service"
systemctl enable first_boot.service
echo "8] Removing puppet"
sudo apt remove puppet
echo "8] Clearing command history"
history -c
echo "ALL DONE! Remember to remove the puppet directory!!"
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