diff options
Diffstat (limited to 'nxt.install')
-rw-r--r-- | nxt.install | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/nxt.install b/nxt.install new file mode 100644 index 000000000000..d7c64c3d3746 --- /dev/null +++ b/nxt.install @@ -0,0 +1,20 @@ +post_install() { + getent passwd nxt &>/dev/null || { + echo -n ">>> Creating nxt user... " + useradd --system --user-group --home /opt/nxt nxt + echo "done" + } + chown -R nxt:nxt /opt/nxt +} + +post_upgrade() { + chown -R nxt:nxt /opt/nxt +} + +pre_remove() { + getent passwd nxt &>/dev/null && { + echo -n ">>> Removing nxt user... " + userdel nxt + echo "done" + } +} |