From 04bab45d516d22229fe42b45d7b6afd0339be4d5 Mon Sep 17 00:00:00 2001 From: Shayan Date: Fri, 15 Oct 2021 17:32:59 +0530 Subject: [PATCH 1/2] Add instructions to create systemd service --- README.md | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/README.md b/README.md index 38263c96..63a8ec70 100644 --- a/README.md +++ b/README.md @@ -91,6 +91,40 @@ After building, to install the executable on the system permanently (so it can b sudo make install ``` +# Autostart on boot using Systemd + +While you could just make a cron or rc entry to run the command on boot, the more "appropriate" way would be to create a systemd service. Create a new service file using: +```bash +sudo nano /etc/systemd/system/rpiplay.service +``` +The contents of the file should be similar to: +```cfg +[Unit] +Description=RPi Play Service +After=network.target +StartLimitIntervalSec=0 +[Service] +Type=simple +Restart=always +RestartSec=1 +User=pi # or your username +ExecStart=/usr/bin/rpiplay # replace with the path of rpiplay and add the options you require +[Install] +WantedBy=multi-user.target +``` +Save the file & exit (Ctrl+O, enter, Ctrl+X). Enable the service to start on boot (might require sudo): +```bash +systemctl enable rpiplay +``` +Done. You can now reboot, or to simply test if it works: +```bash +systemctl start rpiplay +``` +To stop/restart: +```bash +systemctl stop rpiplay +systemctl restart rpiplay +``` # Usage Start the rpiplay executable and an AirPlay mirror target device will appear in the network. From fc274160aab400599150cd3df0af0dce11ddefd9 Mon Sep 17 00:00:00 2001 From: Shayan Date: Fri, 15 Oct 2021 17:35:31 +0530 Subject: [PATCH 2/2] fixed typo in README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 63a8ec70..5513534c 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ By using OpenSSL for AES decryption, I was able to speed up the decryption of vi There still are some minor issues. Have a look at the TODO list below. RPiPlay might not be suitable for remote video playback, as it lacks a dedicated component for that: It seems like AirPlay on an AppleTV effectively runs a web server on the device and sends the URL to the AppleTV, thus avoiding the re-encoding of the video. -For rough details, refer to the (mostly obsolete) [inofficial AirPlay specification](https://nto.github.io/AirPlay.html#screenmirroring). +For rough details, refer to the (mostly obsolete) [unofficial AirPlay specification](https://nto.github.io/AirPlay.html#screenmirroring).