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

Forum dédié aux questions concernant la configuration de votre serveur sous Linux
Phil35
Messages : 41
Inscription : 08 sept. 2020, 08:34

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

Message 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
Dernière modification par Keros le 30 janv. 2024, 18:37, modifié 1 fois.
Raison : Ajout des balises pour le code. Merci de lire la section Bien utiliser le forum
Production : Raspberry Pi 4 Model B Rev 1.2 (OS 10 / buster) + domoticz 2022.2
Production : Raspberry Pi 3 Model B Rev 1.2 (OS 11 / bullseye) + domoticz V2024.7
Keros
Messages : 6638
Inscription : 23 juil. 2019, 20:57

Modération

Message par Keros »

Sujet déplacé dans la section dédiée aux installations sous Linux.
Neutrino
Messages : 2662
Inscription : 10 juil. 2015, 15:42
Localisation : Les Herbiers(85)

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

Message 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 ?
Ma maison à plein d'IP ! :mrgreen:
SAV Bonjour. Vous avez vidé le cache ?
Chrominator
Messages : 1042
Inscription : 19 déc. 2015, 07:29
Localisation : France

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

Message 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
Un bon frein vaut mieux que deux sparadraps.

Ubuntu 24.04.3 LTS - Domoticz 2025.1 (build 16782)
Pentium G3220T 2.6GHz - 4Go DDR3
RFXtrx433 USB Ver Pro1/1043
Z-Stick GEN5 Version: 1.6-1136-g07ea22bb
Rtl433 RTL-SDR receiver
RFLink Gateway
Zigbee SLZB-06
Répondre