summaryrefslogtreecommitdiff
path: root/takepix.service
diff options
context:
space:
mode:
authorst33v <github@f3rr3t.com>2016-02-23 18:03:53 +1100
committerst33v <github@f3rr3t.com>2016-02-23 18:03:53 +1100
commit1e68c6dec5b07670441ddea1f83732fa8f19995f (patch)
treed124bec343466e3be571cbbc59c9b0516b2bf383 /takepix.service
First commit. Basic working state but not very smart yet
Diffstat (limited to 'takepix.service')
-rw-r--r--takepix.service12
1 files changed, 12 insertions, 0 deletions
diff --git a/takepix.service b/takepix.service
new file mode 100644
index 0000000..d7e73b5
--- /dev/null
+++ b/takepix.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=Take a photo and store it ready for uplift to STAN
+
+[Service]
+Type=oneshot
+User=st33v
+# need double quotes to evaluate contents of variable
+# Environment="picdate=date +%Y-%m-%d_%H%M"
+WorkingDirectory=/home/st33v/pix/
+# ExecStart=/bin/echo
+# ExecStart=/opt/vc/bin/raspistill -o /home/st33v/pix/$(eval "echo $(picdate)").jpg
+ExecStart=/usr/local/bin/takepix.sh