Start edged On Boot


ExoEdge is Exosite’s officially supported client to ExoSense.

There are several ways to make sure the edged process(es) on your gateway start on boot and keep them running.


The supervisord tool is handy because it makes sure your processes start on boot, stay running and it takes care of rotating the edged log file.

Install supervisord:

sudo su
apt-get install supervisor --yes

Define the edged config file for supervisord

echo '[program:edged]
command = edged -i /var/config/edged.ini -c /var/config/edged.json go 
autostart = true
autorestart = true
stdout_logfile = /var/log/edged.log
stdout_logfile_maxbytes = 1MB
redirect_stderr = true
' > /etc/supervisor/conf.d/edged.conf



or reload supervisord

supervisorctl reload

Your gateway will now start edged on boot as well as rotate its log file.


Copy this SysV Init Script onto your gateway and execute the following commands.

cp edged /etc/init.d/
chmod 755 /etc/init.d/edged
chown root:root /etc/init.d/edged
update-rc.d edged defaults 90 90

Now, make sure you set up your gateway to rotate the edged logfile.

echo '/var/log/edged.log {
    rotate 3
    maxsize 1M
}' >> /etc/logrotate.conf

crontab -l > tmp
echo -e '* * * * *\t\tlogrotate' >> tmp
crontab tmp

Now, crontab will call logrotate every minute to keep the edged log file at 1MB in size.


There are other ways to accomplish start-on-boot behavior and rotate log files. If you have other methods, please feel free to share them and/or comment on how these might be improved.


~Will Charlton

1 Like


Another popular (maybe the most popular) process manager is systemd. To put ExoEdge under systemd control, copy the contents, below into a new file named edged.service.

NOTE: Edit the ExecStart and other directives as necessary.

ExecStart=/home/pi/phidgets/bin/edged -i /home/pi/phidgets/tst999.ini go

Run the following commands:

> sudo cp edged.service /etc/systemd/system/
> sudo systemctl daemon-reload
> sudo systemctl start edged