diff options
Diffstat (limited to '_ops')
| -rw-r--r-- | _ops/awwan.org/10_www-awwan.aww | 22 | ||||
| -rw-r--r-- | _ops/awwan.org/awwan.env | 2 | ||||
| -rw-r--r-- | _ops/awwan.org/etc/systemd/system/systemctl-restart@.service | 6 | ||||
| -rw-r--r-- | _ops/awwan.org/etc/systemd/system/www-awwan.path | 9 | ||||
| -rw-r--r-- | _ops/awwan.org/etc/systemd/system/www-awwan.service | 12 |
5 files changed, 51 insertions, 0 deletions
diff --git a/_ops/awwan.org/10_www-awwan.aww b/_ops/awwan.org/10_www-awwan.aww new file mode 100644 index 0000000..fdfc7f3 --- /dev/null +++ b/_ops/awwan.org/10_www-awwan.aww @@ -0,0 +1,22 @@ +sudo mkdir -p /srv/awwan +sudo chown ms:ms -R /srv/awwan +sudo chmod +755 /srv/awwan + +#put!+0644 \ + {{.ScriptDir}}/etc/systemd/system/systemctl-restart@.service \ + /etc/systemd/system/systemctl-restart@.service + +sudo systemctl daemon-reload + +#put!+0644 \ + {{.ScriptDir}}/etc/systemd/system/www-awwan.path \ + /etc/systemd/system/www-awwan.path + +sudo systemctl enable --now www-awwan.path + +#put!+0644 \ + {{.ScriptDir}}/etc/systemd/system/www-awwan.service \ + /etc/systemd/system/www-awwan.service + +sudo systemctl enable --now www-awwan.service +sudo systemctl status www-awwan.service diff --git a/_ops/awwan.org/awwan.env b/_ops/awwan.org/awwan.env new file mode 100644 index 0000000..1d6efcb --- /dev/null +++ b/_ops/awwan.org/awwan.env @@ -0,0 +1,2 @@ +[awwan "www"] +bin = /data/app/bin/www-awwan diff --git a/_ops/awwan.org/etc/systemd/system/systemctl-restart@.service b/_ops/awwan.org/etc/systemd/system/systemctl-restart@.service new file mode 100644 index 0000000..800316e --- /dev/null +++ b/_ops/awwan.org/etc/systemd/system/systemctl-restart@.service @@ -0,0 +1,6 @@ +[Unit] +Description=systemctl-restart@%i + +[Service] +Type=oneshot +ExecStart=/bin/systemctl restart %i diff --git a/_ops/awwan.org/etc/systemd/system/www-awwan.path b/_ops/awwan.org/etc/systemd/system/www-awwan.path new file mode 100644 index 0000000..e6ac1c4 --- /dev/null +++ b/_ops/awwan.org/etc/systemd/system/www-awwan.path @@ -0,0 +1,9 @@ +[Unit] +Description="Watch www-awwan" + +[Path] +PathChanged={{.Val "awwan:www:bin"}} +Unit=systemctl-restart@%p.service + +[Install] +WantedBy=multi-user.target diff --git a/_ops/awwan.org/etc/systemd/system/www-awwan.service b/_ops/awwan.org/etc/systemd/system/www-awwan.service new file mode 100644 index 0000000..82f3de7 --- /dev/null +++ b/_ops/awwan.org/etc/systemd/system/www-awwan.service @@ -0,0 +1,12 @@ +[Unit] +Description=www-awwan +After=network-online.target + +[Service] +Type=simple +ExecStart={{.Val "awwan:www:bin"}} +Restart=on-failure +RestartSec=5 + +[Install] +WantedBy=default.target |
