-
Notifications
You must be signed in to change notification settings - Fork 144
Install ArozOS as systemd Service (Start ArozOS on boot for Debian)
Toby Chui edited this page Jun 12, 2023
·
1 revision
Lets assume your arozos system is installed at /home/pi/arozos/src, following the instructions below to setup systemd service for your arozos installation.
- CD into systemd service folder
cd /etc/systemd/system/
2 Enable these two services
sudo systemctl enable systemd-networkd.service systemd-networkd-wait-online.service
- Create the file like arozos.service
sudo nano arozos.service
- Write the service content as follow (replace with your startup directories, use "/home/pi/arozos/src/" instead of "/home/pi/arozos/" if you are cloning from Github)
[Unit]
Description=ArozOS Cloud Service
After=systemd-networkd-wait-online.service
Wants=systemd-networkd-wait-online.service
[Service]
Type=simple
ExecStartPre=/bin/sleep 10
WorkingDirectory=/home/pi/arozos/
ExecStart=/bin/bash /home/pi/arozos/start.sh
Restart=always
RestartSec=10
[Install]
WantedBy=multi-user.target
- Start the service with
sudo systemctl start arozos.service
- Make it automatically startup during boot
sudo systemctl enable arozos.service
This might happen if you have accidentally removed your start.sh file or following installation guide from outdated blog posts. If you do not have a start.sh file inside /home/pi/arozos/start.sh, you can create one yourself using the following commands
sudo nano start.sh
and fill in the following contents
#!/bin/bash
sudo ./arozos -port=8080 -hostname="My ArOZ"
or if you are using launcher
#!/bin/bash
sudo ./launcher -port=8080 -hostname="My ArOZ"
ArOZ Online Project. IMUSLAB