Browse Source

update scripts, add systemd service

master
zapashcanon 2 years ago
parent
commit
53ac4d5b39
Signed by: zapashcanon GPG Key ID: 8981C3C62D1D28F1
  1. 5
      scripts/install.sh
  2. 9
      scripts/start.sh
  3. 10
      www.service

5
scripts/install.sh

@ -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

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

10
www.service

@ -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
Loading…
Cancel
Save