I wanted to say, "take a look at udev". I don't know when exactly udev is useful and when not. Until the OP doesn't describes what exactly should happen, it anyway is impossible to provide good hints. What kind of port? What kind of server? Should systemd just start a script that monitors a port?