The question may seem stupid, but can I just shut down my Pc running Ubuntu with a Tor relay or is there as set procedure?
The default systemd/upstart script should handle a shutdown properly.
The only thing that special about a relay shutdown is that there is a grace period of 30 secs to avoid tearing down short-lived connections.
From tor's the manpage:
When we get a SIGINT and we’re a server, we begin shutting down: we close listeners and start refusing new circuits. After NUM seconds, we exit. If we get a second SIGINT, we exit immediately. (Default: 30 seconds)