summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md17
-rw-r--r--headless-boot.service10
-rwxr-xr-xheadless-boot.sh12
3 files changed, 39 insertions, 0 deletions
diff --git a/README.md b/README.md
index 44c1284..f40ca5d 100644
--- a/README.md
+++ b/README.md
@@ -1,2 +1,19 @@
# raspi-headless
scripts and systemd service to configure a headless raspberry pi
+
+## Version
+Version 1.0 SJ Pratt. 29 December 2016.
+
+## Symlinks for service and script
+To make this service work, create hard links as shown:
+
+|File|Desc| Link to|
+|headless-boot.sh | Turns off HDMI to save power | /usr/local/bin/ |
+|headless-boot.service | Calls bash script | /etc/systemd/system/ |
+
+To enable the service:
+```
+sudo systemctl enable headless-boot
+```
+
+
diff --git a/headless-boot.service b/headless-boot.service
new file mode 100644
index 0000000..feb9352
--- /dev/null
+++ b/headless-boot.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=SJP: configure raspi for headless mode at boot
+
+[Service]
+# Type=Simple
+# User=st33v
+ExecStart=-/usr/local/bin/headless-boot.sh
+
+[Install]
+WantedBy=multi-user.target
diff --git a/headless-boot.sh b/headless-boot.sh
new file mode 100755
index 0000000..24373db
--- /dev/null
+++ b/headless-boot.sh
@@ -0,0 +1,12 @@
+#!/bin/bash
+#
+# for raspi in headless mode
+# Turn off uneeded bits to save power
+# Called from a systemd service at boot
+#
+# SJP 29 Dec 2016
+#
+# Turn off HDMI
+/opt/vc/bin/tvservice -o
+
+