1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/monitorix_ynh.git synced 2024-09-03 19:46:06 +02:00

specify user in systemd config

This commit is contained in:
Josué Tille 2023-01-22 15:32:36 +01:00
parent ae2076761a
commit 6eb5091c41
No known key found for this signature in database
GPG key ID: 716A6C99B04194EF
2 changed files with 3 additions and 1 deletions

View file

@ -3,6 +3,7 @@ Description=Monitorix
[Service]
Type=simple
User=__SYSTEMD_USER__
ExecStart=/usr/bin/monitorix -c /etc/monitorix/monitorix.conf -p /var/run/monitorix.pid -n
Restart=always

View file

@ -3,6 +3,7 @@
#=================================================
app=$YNH_APP_INSTANCE_NAME
systemd_user=root
#=================================================
# DEFINE ALL COMMON FONCTIONS
@ -46,7 +47,7 @@ config_monitorix() {
done
monitorix_conf=/etc/monitorix/monitorix.conf
cp ../conf/monitorix.conf $monitorix_conf
cp ../conf/monitorix.conf $monitorix_conf
ynh_replace_string --match_string __SERVICE_PORT__ --replace_string $port --target_file $monitorix_conf
ynh_replace_string --match_string __YNH_DOMAIN__ --replace_string $domain --target_file $monitorix_conf
ynh_replace_string --match_string __NGINX_STATUS_PORT__ --replace_string $nginx_status_port --target_file $monitorix_conf