the 'set -e' prevents it from actually updating the config file and restarting when a new conf file has different contents.
the tor service provides hidden services for bitcoin and lightning. in the latter case, both P2P and RPC/REST. the commit also starts a new directory files. the idea is to mirror config files layout in the target system.