GPIO Unexport for Rasbperry PI3

I have Rasbperry PI3 with installed newer rasbian, and using GPIO Binding.
How to make automatically GPIO Unexport?
I try to add
"echo 23 > /sys/class/gpio/unexport
echo 24 > /sys/class/gpio/unexport"
to stop section in openhab init.d scrips but not working.