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:
parent
ae2076761a
commit
6eb5091c41
2 changed files with 3 additions and 1 deletions
|
@ -3,6 +3,7 @@ Description=Monitorix
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=simple
|
Type=simple
|
||||||
|
User=__SYSTEMD_USER__
|
||||||
ExecStart=/usr/bin/monitorix -c /etc/monitorix/monitorix.conf -p /var/run/monitorix.pid -n
|
ExecStart=/usr/bin/monitorix -c /etc/monitorix/monitorix.conf -p /var/run/monitorix.pid -n
|
||||||
Restart=always
|
Restart=always
|
||||||
|
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
app=$YNH_APP_INSTANCE_NAME
|
app=$YNH_APP_INSTANCE_NAME
|
||||||
|
systemd_user=root
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# DEFINE ALL COMMON FONCTIONS
|
# DEFINE ALL COMMON FONCTIONS
|
||||||
|
@ -46,7 +47,7 @@ config_monitorix() {
|
||||||
done
|
done
|
||||||
|
|
||||||
monitorix_conf=/etc/monitorix/monitorix.conf
|
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 __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 __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
|
ynh_replace_string --match_string __NGINX_STATUS_PORT__ --replace_string $nginx_status_port --target_file $monitorix_conf
|
||||||
|
|
Loading…
Add table
Reference in a new issue