Run custom script after login or after launching a user server

There are some files that I would like all my users to have access to. Specifically, I want there to be a symlink, for read-only access and a copy that they can play with and break.
The former is quite trivial, I just created a symlink in /etc/skel.
The latter is proving to be quite a challenge. I would like to have the server run a bash script to “update” the contents of the… let’s call it the sandbox directory. Any ideas on where I should start?
I’m currently thinking of modifying the login code, such that it would run the bash script as soon as the Authenticator is done authenticating. A slightly more elegant solution might be to have it run with the server spawner, but I have no idea on how to begin to do this.
Any help would be appreciated.

1 Like