update scripts, add systemd service

This commit is contained in:
zapashcanon 2021-11-23 22:59:30 +01:00
parent 358948b83a
commit 53ac4d5b39
Signed by: zapashcanon
GPG Key ID: 8981C3C62D1D28F1
3 changed files with 20 additions and 4 deletions

View File

@ -5,10 +5,7 @@ set -eu
( cd "$(dirname "$0")/../"
sudo cp ./*.conf /etc/apache2/sites-available/
dune build @all
dune install
sudo cp ./*.service /etc/systemd/system/
sudo service apache2 restart
echo "Installed !"

9
scripts/start.sh Executable file
View File

@ -0,0 +1,9 @@
#!/bin/sh
set -eu
( cd "$(dirname "$0")/../"
dune exec -- src/www.exe
)

10
www.service Normal file
View File

@ -0,0 +1,10 @@
[Unit]
Description=www
After=network-online.target
[Service]
ExecStart=/home/www/www.zapashcanon.fr/scripts/start.sh
User=www
[Install]
WantedBy=multi-user.target