The other option is to put in /storage/.config/shutdown.sh code like this:
Code
case "$1" in
halt)
# your commands here
;;
poweroff)
# your commands here
;;
reboot)
# your commands here
;;
*)
# your commands here
sed -i 's/SH_ARGS=".*"/SH_ARGS="-p 33322" /g' /storage/.cache/services/sshd.conf
;;
esac
Display More
Everything is retained over the reboot.
Thanks to everyone in this thread, it's the only source of information i found about this issue