Hi,
Could someone please explain to me why when I restart service in 2 diffrents way, PATH env is different:
I don't understand the difference between
How can I get the same PATH env with
?
Thanks!
Could someone please explain to me why when I restart service in 2 diffrents way, PATH env is different:
Bash:
root@nocloud ~ $ service zabbix_agentd restart 2>&1 | grep PATH
+ PATH=/sbin:/bin:/usr/sbin:/usr/bin /usr/local/sbin/zabbix_agentd -c /usr/local/etc/zabbix6/zabbix_agentd.conf
root@nocloud ~ $ /usr/local/etc/rc.d/zabbix_agentd restart 2>&1 | grep PATH
+ PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:/root/bin /usr/local/sbin/zabbix_agentd -c /usr/local/etc/zabbix6/zabbix_agentd.conf
I don't understand the difference between
service
and /usr/local/etc/rc.d
.How can I get the same PATH env with
Code:
service
Thanks!