From 6fe7d465c48a54108285f73364ec0c019abc1a93 Mon Sep 17 00:00:00 2001
From: Neil Gershenfeld <gersh@cba.mit.edu>
Date: Tue, 12 Dec 2017 01:23:52 -0500
Subject: [PATCH] wip

---
 README.md    | 11 ++++++++---
 cams.service | 11 +++++++++++
 2 files changed, 19 insertions(+), 3 deletions(-)
 create mode 100644 cams.service

diff --git a/README.md b/README.md
index 6c27652..cfdd839 100644
--- a/README.md
+++ b/README.md
@@ -12,7 +12,7 @@ can use uvcdynctrl -f to list resolutions
 
 can use fswebcam --list-controls to list controls
 
-can use http-server-with-auth to serve  
+can use http-server-with-auth to serve:  
 http-server-with-auth -p port --username username --password password  
 http-server-with-auth -p port --username username --password password --ssl --cert cert.pem --key key.pem  
 
@@ -20,8 +20,13 @@ last image is at http://this_address:this_port/oldimage.jpg
 
 can use Logitech C920 HD Webcam
 
-can use Ubuntu MATE on Raspberry Pi 3  
+can use Ubuntu MATE on Raspberry Pi 3:  
 sudo apt-get install nodejs-legacy npm fswebcam imagemagick  
 sudo npm install -g http-server-with-auth  
 System -> Administration -> Time and Date -> Keep synchronized with internet servers  
-   
+
+can start on boot with cams.service:  
+sudo cp cams.service /lib/systemd/system
+sudo systemctl daemon-reload
+sudo systemctl enable cams.service
+sudo systemctl start cams.service
diff --git a/cams.service b/cams.service
new file mode 100644
index 0000000..bc5d066
--- /dev/null
+++ b/cams.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=cams
+After=network.target
+
+[Service]
+Type=forking
+ExecStart=/bin/bash /home/fab/cams/cams
+
+[Install]
+WantedBy=multi-user.target
+
-- 
GitLab