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

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.