Skip to content

Commit

Permalink
Merge pull request #198 from FlowFuse/more-rebranding
Browse files Browse the repository at this point in the history
Rebranding in the service file and installer
  • Loading branch information
hardillb authored Nov 8, 2023
2 parents 47ca4c9 + 0d152cd commit dc8d587
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 20 deletions.
3 changes: 2 additions & 1 deletion .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ docker/*
.github
.gitmodules
.browserslistrc
test/
test/
var/
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
# systemd service file to start FlowForge
# systemd service file to start FlowFuse

[Unit]
Description=FlowForge Device Agent
Description=FlowFuse Device Agent
Wants=network.target
Documentation=https://flowforge.com/docs
Documentation=https://flowfuse.com/docs

[Service]
Type=simple
# Run as normal pi user - change to the user name you wish to run FlowForge Device as
# Run as normal pi user - change to the user name you wish to run FlowFuse Device as
User=pi
Group=pi
WorkingDirectory=/opt/flowforge-device
WorkingDirectory=/opt/flowfuse-device

Environment="NODE_OPTIONS=--max_old_space_size=512"
ExecStart=/usr/bin/env flowforge-device-agent
ExecStart=/usr/bin/env flowfuse-device-agent
# Use SIGINT to stop
KillSignal=SIGINT
# Auto restart on crash
Restart=on-failure
RestartSec=20
# Tag things in the log
SyslogIdentifier=FlowForgeDevice
SyslogIdentifier=FlowFuseDevice
#StandardOutput=syslog

[Install]
Expand Down
24 changes: 12 additions & 12 deletions service/raspbian-install-device-agent.sh
Original file line number Diff line number Diff line change
Expand Up @@ -76,41 +76,41 @@ if ! HAS_NPM; then
fi

# Install Device Agent
sudo npm install -g @flowforge/flowforge-device-agent
sudo npm install -g @flowfuse/device-agent

# Create the working directory for the Device Agent
sudo mkdir -p /opt/flowforge-device
sudo chown -R $USER /opt/flowforge-device
sudo mkdir -p /opt/flowfuse-device
sudo chown -R $USER /opt/flowfuse-device

# Create systemd service file for Device Agent
echo "[Unit]
Description=FlowForge Device Agent
Description=FlowFuse Device Agent
Wants=network.target
Documentation=https://flowforge.com/docs
Documentation=https://flowfuse.com/docs
[Service]
Type=simple
User=$USER
WorkingDirectory=/opt/flowforge-device
WorkingDirectory=/opt/flowfuse-device
Environment="NODE_OPTIONS=--max_old_space_size=512"
ExecStart=/usr/bin/env flowforge-device-agent
ExecStart=/usr/bin/env flowfuse-device-agent
# Use SIGINT to stop
KillSignal=SIGINT
# Auto restart on crash
Restart=on-failure
RestartSec=20
# Tag things in the log
SyslogIdentifier=FlowForgeDevice
SyslogIdentifier=FlowFuseDevice
#StandardOutput=syslog
[Install]
WantedBy=multi-user.target" | sudo tee /etc/systemd/system/flowforge-device-agent.service >/dev/null
WantedBy=multi-user.target" | sudo tee /etc/systemd/system/flowfuse-device-agent.service >/dev/null

# Reload systemd, enable and start the service
sudo systemctl daemon-reload
sudo systemctl enable flowforge-device-agent.service
sudo systemctl start flowforge-device-agent.service
sudo systemctl enable flowfuse-device-agent.service
sudo systemctl start flowfuse-device-agent.service

# Output status of the service
sudo systemctl status flowforge-device-agent.service
sudo systemctl status flowfuse-device-agent.service

0 comments on commit dc8d587

Please sign in to comment.