Commit 43f04fc3 by source_reader

added nilmdb-fsck to nilmdb start

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