I am currently working on a Debian package for my own program. As part of this package, I need to create a user who performs most of the functions of the program. I do this in a postinst script. A Postinst script can be executed several times (for example, when updating), so it is important to ensure that I will not try to create a user each time.
So, how can I make sure that the user is created only the first time the script is executed, without affecting it the next time the script runs?
source
share