From 1e68c6dec5b07670441ddea1f83732fa8f19995f Mon Sep 17 00:00:00 2001 From: st33v Date: Tue, 23 Feb 2016 18:03:53 +1100 Subject: First commit. Basic working state but not very smart yet --- takepix.service | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 takepix.service (limited to 'takepix.service') 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 -- cgit v1.3