## **************************************************************************
## For copyright and licensing terms, see the file named COPYING.
## **************************************************************************

[Unit]
Description=appcafe subsystem: nginx HTTP content server
Before=appcafe-nginx.service

[Service]
Type=oneshot
EnvironmentDirectory=env
ExecStart=sh -c 'test -e /usr/local/etc/appcafe.crt || openssl req -x509 -nodes -newkey rsa:2048 -keyout /usr/local/etc/appcafe.key -out /usr/local/etc/appcafe.crt -days 1024 -subj "/C=US/ST=MY/L=NULL/O=AppCafe/OU=AppCafe/CN=AppCafe/emailAddress=none@example.org"'
# This is a one-shot service that can be re-triggered by starting it again.
Restart=no

[Install]
WantedBy=appcafe.target
