Add systemd service unit and install target
This commit is contained in:
@@ -20,8 +20,8 @@ sudo apt update && sudo apt install -y build-essential cmake git
|
||||
Clona il repository includendo il submodule `xombe`:
|
||||
|
||||
```bash
|
||||
git clone --recursive https://git.arifvg.it/iv3jdv/ambed-xombe.git
|
||||
cd ambed-xombe
|
||||
git clone --recursive https://git.arifvg.it/iv3jdv/ambed-xombe.git /ambed
|
||||
cd /ambed
|
||||
make -j$(nproc)
|
||||
```
|
||||
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
[Unit]
|
||||
Description=AMBEd Transcoder Daemon (xombe)
|
||||
After=network.target
|
||||
Before=xlxd.service
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
WorkingDirectory=/ambed
|
||||
ExecStart=/ambed/ambed /ambed/ambed.ini
|
||||
Restart=always
|
||||
RestartSec=3
|
||||
StandardOutput=journal
|
||||
StandardError=journal
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
@@ -59,5 +59,7 @@ distclean: clean
|
||||
install:
|
||||
mkdir -p /ambed
|
||||
cp $(EXECUTABLE) /ambed/
|
||||
cp ./run /ambed/
|
||||
test -f /ambed/ambed.ini || cp ./ambed.ini /ambed/
|
||||
cp ./ambed.service /etc/systemd/system/
|
||||
systemctl daemon-reload
|
||||
@echo "Installazione completata. Avvia con: sudo systemctl enable --now ambed.service"
|
||||
|
||||
Reference in New Issue
Block a user