Page 1 sur 1

Domoticz : Démarrage as a service : problème

Publié : 30 janv. 2024, 16:26
par Phil35
Bonjour,
Sur raspberry pi Raspberry Pi 3 Model B Rev 1.2
OS : Debian GNU/Linux 11 (bullseye) aarch64
Kernel: 6.1.21-v8+
domoticz : 2024.4 (mais même pb en 2024.3, avant je ne sais pas)

Le démarrage de domoticz fonctionne et à toujours fonctionné avec un
cd /home/domoticz/domoticz
sudo ./domoticz.sh start

Je souhaite le mettre en mode service permettant un démarrage avec : service domoticz start et stop bien sûr

Cela ne fonctionne pas, Y a ce message d'erreur :
Jan 30 16:17:36 domoticz domoticz[2038]: 2024-01-30 16:17:36.085 Status: Domoticz V2024.4 (c)2012-2024 GizMoCuz
Jan 30 16:17:36 domoticz domoticz[2038]: 2024-01-30 16:17:36.085 Status: Build Hash: 731719420, Date: 2024-01-30 09:16:34
Jan 30 16:17:36 domoticz domoticz[2038]: 2024-01-30 16:17:36.085 Status: Startup Path: /home/domoticz/domoticz/
Jan 30 16:17:36 domoticz domoticz[2038]: 2024-01-30 16:17:36.086 #033[1;31mError: Error opening SQLite3 database: unable to open database file#033[0;0m
Jan 30 16:17:36 domoticz systemd[1]: domoticz.service: Main process exited, code=exited, status=1/FAILURE
Jan 30 16:17:36 domoticz systemd[1]: domoticz.service: Failed with result 'exit-code'.
J'ai lu par ex : https://www.raspberryme.com/programmes- ... pberry-pi/
et https://forums.framboise314.fr/viewtopic.php?t=6844

J'ai essayé le script dans domoticz.service /etc/systemd/system/ et dans /lib/systemd/system/ : même erreur

contenu du fichier domoticz.service :

Code : Tout sélectionner

[Unit]
	Description=domoticz_service
	After=network.target
[Service]
	Type=simple
	User=domoticz
	Group=domoticz
	ExecStart=/home/domoticz/domoticz/domoticz -www 8080 -sslwww 443 -log /tmp/domoticz2.txt
	PIDFile=/var/run/domoticz.pid
       	Restart=on-failure
       	RestartSec=1m
[Install]
       WantedBy=multi-user.target
C'est comme si un cd n'était pas fait dans le répertoire ou se trouve la base [ /home/domoticz/domoticz ]
une idée ?
Merci beaucoup
Cordialement

Modération

Publié : 30 janv. 2024, 18:39
par Keros
Sujet déplacé dans la section dédiée aux installations sous Linux.

Re: Domoticz : Démarrage as a service : problème

Publié : 31 janv. 2024, 07:50
par Neutrino

Code : Tout sélectionner

	ExecStart=/home/domoticz/domoticz/domoticz -www 8080 -sslwww 443 -log /tmp/domoticz2.txt
il y a pas un domoticz de trop ?

Re: Domoticz : Démarrage as a service : problème

Publié : 01 févr. 2024, 07:49
par Chrominator
Je suppose que ta base est dans /home/domoticz/domoticz/ sous le nom domoticz.db.

Essaye de modifier le fichier domoticz.service comme suit :

Code : Tout sélectionner

ExecStart=/home/domoticz/domoticz/domoticz -www 8080 -sslwww 443 -log /tmp/domoticz2.txt -dbase /home/domoticz/domoticz/domoticz.db
https://www.domoticz.com/wiki/Command_line_parameters