Compare commits

..

3 Commits

Author SHA1 Message Date
tteckster f796767e06
Update mqtt-install.sh
create `/etc/mosquitto/conf.d/default.conf`
2023-08-07 14:00:26 -04:00
tteckster 7add9d891d
Update dashy-install.sh
tweak
2023-08-07 08:56:46 -04:00
spooknik 80ad523a24
Auto Rebuilt (#1670)
Create a systemd service that triggers the rebuilding of Dashy whenever changes are made to the configuration file.
2023-08-07 08:52:42 -04:00
2 changed files with 30 additions and 4 deletions

View File

@ -42,7 +42,7 @@ export NODE_OPTIONS=--max-old-space-size=1000
$STD yarn build $STD yarn build
msg_ok "Installed Dashy" msg_ok "Installed Dashy"
msg_info "Creating Service" msg_info "Creating Services"
cat <<EOF >/etc/systemd/system/dashy.service cat <<EOF >/etc/systemd/system/dashy.service
[Unit] [Unit]
Description=dashy Description=dashy
@ -54,9 +54,29 @@ ExecStart=/usr/bin/yarn start
[Install] [Install]
WantedBy=multi-user.target WantedBy=multi-user.target
EOF EOF
$STD systemctl enable dashy
systemctl start dashy cat <<EOF >/etc/systemd/system/dashy-rebuild.service
msg_ok "Created Service" [Unit]
Description=Rebuild Dashy on Config Changes
[Service]
Type=oneshot
ExecStart=/usr/bin/yarn --cwd=/dashy build
EOF
cat <<EOF >/etc/systemd/system/dashy-rebuild.path
[Unit]
Description=Monitor Dashy Config for Changes
[Path]
PathChanged=/dashy/public/conf.yml
[Install]
WantedBy=multi-user.target
EOF
systemctl -q --now enable dashy
systemctl -q --now enable dashy-rebuild
msg_ok "Created Services"
motd_ssh motd_ssh
customize customize

View File

@ -22,6 +22,12 @@ msg_ok "Installed Dependencies"
msg_info "Installing Mosquitto MQTT Broker" msg_info "Installing Mosquitto MQTT Broker"
$STD apt-get -y install mosquitto $STD apt-get -y install mosquitto
$STD apt-get -y install mosquitto-clients $STD apt-get -y install mosquitto-clients
cat <<EOF >/etc/mosquitto/conf.d/default.conf
allow_anonymous false
persistence true
password_file /etc/mosquitto/passwd
listener 1883
EOF
msg_ok "Installed Mosquitto MQTT Broker" msg_ok "Installed Mosquitto MQTT Broker"
motd_ssh motd_ssh