Skip to content

Commit

Permalink
deb installer cleanup
Browse files Browse the repository at this point in the history
Instead of installing directly into /etc/service/thingpin populate the
thingpin service dir in /tmp then move it to /etc/service/thingpin. This
guards against runit seeing the partially created service and trying to run it.
  • Loading branch information
mgk committed Dec 17, 2015
1 parent 598642e commit f9ee0e4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
9 changes: 5 additions & 4 deletions Makefile
Expand Up @@ -62,8 +62,8 @@ coverage:
coverage run --source=src/thingpin -m py.test
coverage html

scp: build deb
scp dist/*.deb dist/*.tar.gz pi@pi2a.local:~/
scp: deb
scp $(DEB_PACKAGE) pi@pi2a.local:~/

deb: build
fpm -s dir -t deb -a all \
Expand All @@ -72,8 +72,9 @@ deb: build
--depends runit \
--template-scripts \
--after-install src/misc/fpm-after-install.sh \
`ls dist/*.tar.gz`=/tmp/$(NAME)-$(VERSION).tar.gz \
src/examples/etc/=/etc/
`ls dist/*.tar.gz`=/tmp/$(NAME)-$(VERSION).tar.gz \
src/examples/etc/thingpin/=/etc/thingpin/ \
src/examples/etc/service/thingpin/=/tmp/thingpin-service/

gemfury-upload:
curl -F package=@$(DEB_PACKAGE) https://push.fury.io/$(GEMFURY_API_TOKEN)/
Expand Down
2 changes: 2 additions & 0 deletions src/misc/fpm-after-install.sh
Expand Up @@ -5,3 +5,5 @@ pip2 install /tmp/<%= name %>-<%= version %>.tar.gz

echo "Install Adafruit IO client package..."
pip2 install https://github.com/adafruit/io-client-python/zipball/65320a3a

mv /tmp/thingpin-service /etc/service/thingpin

0 comments on commit f9ee0e4

Please sign in to comment.