Configure Ubuntu Linux to auto start DSA server - IOT-DSA/docs GitHub Wiki

This instruction assumes that your Ubuntu Linux is using systemd service to manage applications.

1. Create a system service for DSA

sudo nano /etc/systemd/system/dsa.service

2. Copy and paste the following script into this file.

[Unit]
Description=DSA
After=syslog.target network.target

[Service]
LimitNOFILE=65535
Type=forking
ExecStart=/opt/dsa/dglux-server/bin/daemon.sh start
ExecReload=/opt/dsa/dglux-server/bin/daemon.sh restart
ExecStop=/opt/dsa/dglux-server/bin/daemon.sh stop

[Install]
WantedBy=multi-user.target

Important! Make sure to verify paths to your daemon.sh file above. It is the same directory where you installed DSA. Save the file and continue.

3. Enable auto-start

sudo systemctl enable dsa

4. Start DSA service

sudo service dsa start