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`:
|
Clona il repository includendo il submodule `xombe`:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
git clone --recursive https://git.arifvg.it/iv3jdv/ambed-xombe.git
|
git clone --recursive https://git.arifvg.it/iv3jdv/ambed-xombe.git /ambed
|
||||||
cd ambed-xombe
|
cd /ambed
|
||||||
make -j$(nproc)
|
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:
|
install:
|
||||||
mkdir -p /ambed
|
mkdir -p /ambed
|
||||||
cp $(EXECUTABLE) /ambed/
|
cp $(EXECUTABLE) /ambed/
|
||||||
cp ./run /ambed/
|
|
||||||
test -f /ambed/ambed.ini || cp ./ambed.ini /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