Skip to content

Commit

Permalink
Conf updated.
Browse files Browse the repository at this point in the history
  • Loading branch information
idlesign committed Feb 12, 2020
1 parent 3b1100a commit 1e7e27c
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 1 deletion.
2 changes: 1 addition & 1 deletion demo/conf/mydemo-certbot-hook.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#! /bin/sh
chown -R mydemo:mydemo /etc/letsencrypt/archive/mydemo.here/.*
mydemo uwsgi_reload
systemctl restart mydemo.service
50 changes: 50 additions & 0 deletions demo/conf/mydemo.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Place into: /etc/systemd/system/mydemo.service
# Setup: sudo systemctl enable $PWD/mydemo.service
# Start: sudo systemctl start mydemo.service
# Stop: sudo systemctl stop mydemo.service
# Restart: sudo systemctl restart mydemo.service
# Status: systemctl status mydemo.service
# Journal: journalctl -fu mydemo.service

[Unit]
Description=mydemo webscaff service
Wants=network-online.target
After=network-online.target


[Service]
ExecStart=/usr/bin/mydemo uwsgi_run
Restart=on-failure
KillSignal=SIGTERM
Type=notify
NotifyAccess=all
# Bind to priviledged ports.
AmbientCapabilities=CAP_NET_BIND_SERVICE

CPUAccounting=yes
MemoryAccounting=yes
IOAccounting=yes
IPAccounting=yes
PrivateTmp=yes
RemoveIPC=yes
TasksAccounting=yes

ProtectSystem=strict
ProtectHome=read-only

User=mydemo
Group=mydemo

# /run/
RuntimeDirectory=mydemo
# /var/lib/
StateDirectory=mydemo
# /var/log/
LogsDirectory=mydemo
# /var/cache/
CacheDirectory=mydemo


[Install]
WantedBy=multi-user.target

0 comments on commit 1e7e27c

Please sign in to comment.