Skip to content

Commit

Permalink
Sample unit file to run envetcd using systemd
Browse files Browse the repository at this point in the history
[Finishes #82827528]
  • Loading branch information
Carl Saturnino committed Nov 20, 2014
1 parent cd98411 commit 509f876
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions example/envetcd-sample.service
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,13 @@ WantedBy=default.target

[Service]
User=core
Type=oneshot
EnvironmentFile=/etc/environment
ExecStartPre=/bin/bash -c "echo Starting..."
ExecStart=/bin/bash -c "TMPFILE_ENVETCD=$(mktemp -t service.XXXXXXXXXX); \
echo $$TMPFILE_ENVETCD; \
/envetcd --service redis --output $TMPFILE_ENVETCD -c env; \
/usr/bin/docker images; \
echo "Removing temporary file; \
/usr/bin/rm -f $TMPFILE_ENVETCD ;"
echo Temporary File $$TMPFILE_ENVETCD; \
/envetcd --service redis --output $TMPFILE_ENVETCD -c env; \
exec /usr/bin/docker run \
--rm -t \
--name redis-server \
zvelo/zvelo-redis; "
ExecStartPost=/bin/bash -c "echo DONE"

0 comments on commit 509f876

Please sign in to comment.