update scripts, add systemd service
This commit is contained in:
parent
358948b83a
commit
53ac4d5b39
@ -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
9
scripts/start.sh
Executable file
@ -0,0 +1,9 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -eu
|
||||
|
||||
( cd "$(dirname "$0")/../"
|
||||
|
||||
dune exec -- src/www.exe
|
||||
|
||||
)
|
10
www.service
Normal file
10
www.service
Normal 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
|
Loading…
x
Reference in New Issue
Block a user