mirror of
https://github.com/tteck/Proxmox.git
synced 2024-12-27 07:21:59 +00:00
Auto Rebuilt (#1670)
Create a systemd service that triggers the rebuilding of Dashy whenever changes are made to the configuration file.
This commit is contained in:
parent
4da3ef9bfd
commit
80ad523a24
@ -42,7 +42,7 @@ export NODE_OPTIONS=--max-old-space-size=1000
|
||||
$STD yarn build
|
||||
msg_ok "Installed Dashy"
|
||||
|
||||
msg_info "Creating Service"
|
||||
msg_info "Creating Services"
|
||||
cat <<EOF >/etc/systemd/system/dashy.service
|
||||
[Unit]
|
||||
Description=dashy
|
||||
@ -56,7 +56,30 @@ WantedBy=multi-user.target
|
||||
EOF
|
||||
$STD systemctl enable dashy
|
||||
systemctl start dashy
|
||||
msg_ok "Created Service"
|
||||
|
||||
cat > /etc/systemd/system/dashy-rebuild.service << EOF
|
||||
[Unit]
|
||||
Description=Rebuild Dashy on Config Changes
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=/usr/bin/yarn --cwd=/dashy build
|
||||
EOF
|
||||
|
||||
cat > /etc/systemd/system/dashy-rebuild.path << EOF
|
||||
[Unit]
|
||||
Description=Monitor Dashy Config for Changes
|
||||
|
||||
[Path]
|
||||
PathChanged=/dashy/public/conf.yml
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
|
||||
$STD systemctl enable dashy-rebuild
|
||||
systemctl start dashy-rebuild
|
||||
msg_ok "Created Services"
|
||||
|
||||
motd_ssh
|
||||
customize
|
||||
|
Loading…
Reference in New Issue
Block a user