Skip to content

Commit 54ad939

Browse files
authored
Create howtoStartOnPi.md
1 parent ab223d5 commit 54ad939

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# How to autostart the video server on the Pi
2+
Hardware: Raspberry Pi 4b- 8g
3+
OS: Ubuntu Server 22.04 lts
4+
Program: rtsp-simple-server
5+
6+
When trying to accomplish Auto start on system startup/reboot,
7+
8+
Solution:
9+
For the .service file, you will need to add and edit the following:
10+
```
11+
[Unit]
12+
Description=rtsp-simple-server
13+
After=network-online.target
14+
Wants=netowrk-online.target
15+
16+
[Service]
17+
ExecStart=/usr/local/bin/rtsp-simple-server /usr/local/etc/rtsp-simple-server.yml
18+
19+
[Install]
20+
WantedBy=multi-user.target
21+
```
22+
23+
To build the auto start file, the Solution:
24+
The root user is needed
25+
```sudo -i```
26+
27+
Build your file:
28+
---crontab -e (if this is new, select 1 when prompted)
29+
30+
at the end of the file add the 3 @ lines
31+
```
32+
@reboot sudo systemctl enable rtsp-simple-server &
33+
@reboot sudo systemctl stop rtsp-simple-server &
34+
@reboot nohup sudo rtsp-simple-server &
35+
```

0 commit comments

Comments
 (0)