Script /etc/profile.d/ not compatible with dash — CyberPanel - WebHosting Control Panel for OpenLiteSpeed

Script /etc/profile.d/ not compatible with dash

edited December 2020 in Feature Request
The if statement in is not compatible with the dash shell. It produces the following error:

/etc/profile.d/ 25: [[: not found

This error was triggered for me while trying to edit a netdata config file, as follows:

> /etc/netdata/edit-config health_alarm_notify.conf

This script executes: . /etc/profile

I think the if statement could be changed to:

[ -f /etc/cyberpanel/ ] && source /etc/cyberpanel/

for increased compatibility.
Sign In or Register to comment.
CyberPanel Discord

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!