Commit da119303 by source_reader

bug fixes

parent 53f64a94
...@@ -21,5 +21,8 @@ systemctl enable first_boot.service ...@@ -21,5 +21,8 @@ systemctl enable first_boot.service
echo "5] Clearing command history" echo "5] Clearing command history"
history -c history -c
rm -rf /root/puppet rm -rf /root/puppet
rm -rf /root/.joule
rm -rf ~/.joule
echo "Remember to remove ubuntu user and /home/ubuntu!" echo "Remember to remove ubuntu user and /home/ubuntu!"
history -c
...@@ -140,6 +140,7 @@ class docs::nilm(String $docs_path, String $owner){ ...@@ -140,6 +140,7 @@ class docs::nilm(String $docs_path, String $owner){
provider => git, provider => git,
source => "${git_cmd}/uscg-dashboard/nilm-dashboard.git", source => "${git_cmd}/uscg-dashboard/nilm-dashboard.git",
user => $owner, user => $owner,
submodules => false
} }
vcsrepo{"${src_path}/load-detector": vcsrepo{"${src_path}/load-detector":
ensure => latest, ensure => latest,
......
...@@ -6,6 +6,11 @@ class first_boot { ...@@ -6,6 +6,11 @@ class first_boot {
} else { } else {
$nilmdb = false $nilmdb = false
} }
if $facts['platform'] == 'pi'{
$pi = true
} else {
$pi = false
}
file {'/usr/local/bin/first_boot': file {'/usr/local/bin/first_boot':
ensure => present, ensure => present,
owner => root, owner => root,
......
...@@ -22,8 +22,10 @@ fi ...@@ -22,8 +22,10 @@ fi
# only run once # only run once
systemctl disable first_boot.service systemctl disable first_boot.service
<% if @pi %>
( (
<% end %>
echo "# Generating Encryption Keys" echo "# Generating Encryption Keys"
RAILS_PWD="$(openssl rand -hex 8)" RAILS_PWD="$(openssl rand -hex 8)"
JOULE_PWD="$(openssl rand -hex 8)" JOULE_PWD="$(openssl rand -hex 8)"
...@@ -76,7 +78,8 @@ echo "# Starting Lumen Webserver" ...@@ -76,7 +78,8 @@ echo "# Starting Lumen Webserver"
service nginx restart service nginx restart
echo "# All Done!" echo "# All Done!"
sleep 1 sleep 1
<% if @pi %>
) | cat > $pipe ) | cat > $pipe
<% end %>
service joule start service joule start
class nginx { class nginx {
require joule
if $facts['platform'] == 'ubuntu'{ if $facts['platform'] == 'ubuntu'{
$install = 'nginx::install::ubuntu' $install = 'nginx::install::ubuntu'
} else { } else {
......
...@@ -3,7 +3,7 @@ class nilm { ...@@ -3,7 +3,7 @@ class nilm {
$pip_url='https://pypi.wattsworth.net/' $pip_url='https://pypi.wattsworth.net/'
$pip_cmd="pip3 install --upgrade --extra-index-url ${pip_url}" $pip_cmd="pip3 install --upgrade --extra-index-url ${pip_url}"
package{'libfreetype6-dev': package{['libfreetype6-dev','python3-tk','libatlas-base-dev']:
ensure => present ensure => present
} }
exec{'install_nilm': exec{'install_nilm':
......
...@@ -6,6 +6,7 @@ Restart = always ...@@ -6,6 +6,7 @@ Restart = always
StandardOutput=journal StandardOutput=journal
#ExecStartPre = /usr/local/bin/nilmdb-fsck -f -n /opt/data #ExecStartPre = /usr/local/bin/nilmdb-fsck -f -n /opt/data
ExecStart = /usr/local/bin/uwsgi --ini /etc/nilmdb/nilmdb.ini ExecStart = /usr/local/bin/uwsgi --ini /etc/nilmdb/nilmdb.ini
KillSignal = SIGQUIT
[Install] [Install]
WantedBy=multi-user.target WantedBy=multi-user.target
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