Эх сурвалжийг харах

Updated systemd sanmple and tutorial docss

Toby Chui 3 жил өмнө
parent
commit
2240990a8b

+ 6 - 6
documents/How to add aroz online service.txt

@@ -1,13 +1,13 @@
 1. CD into systemd service folder
 	cd /etc/systemd/system/
 
-2. Create the file like arozos.service
-	sudo nano arozos.service
-
-3.1 Enable these two services
+2 Enable these two services
 	sudo systemctl enable systemd-networkd.service systemd-networkd-wait-online.service
 
-3.2. Write the service content as follow (replace your startup directories)
+3. Create the file like arozos.service
+	sudo nano arozos.service
+
+4. 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
@@ -16,7 +16,7 @@ Wants=systemd-networkd-wait-online.service
 
 [Service]
 Type=simple
-ExecStartPre=/bin/sleep 30
+ExecStartPre=/bin/sleep 10
 WorkingDirectory=/home/pi/arozos/
 ExecStart=/bin/bash /home/pi/arozos/start.sh
 

+ 6 - 5
documents/systemd service config example.txt

@@ -1,12 +1,13 @@
 [Unit]
-Description=AROZOS Cloud Service
-Wants=network-online.target
-After=network-online.target
+Description=ArozOS Cloud Service
+After=systemd-networkd-wait-online.service
+Wants=systemd-networkd-wait-online.service
 
 [Service]
 Type=simple
-WorkingDirectory=/home/pi/aroz_online/
-ExecStart=/bin/bash /home/pi/aroz_online/start.sh
+ExecStartPre=/bin/sleep 10
+WorkingDirectory=/home/pi/arozos/src/
+ExecStart=/bin/bash /home/pi/arozos/src/start.sh
 
 Restart=always
 RestartSec=10