...
3) stop the Unimus service
Code Block |
---|
|
systemctl stop unimus |
4) create a new user and fix access to required directories
Code Block |
---|
|
# create user
SERVICE_USER="unimus-service"
adduser $SERVICE_USER --system --no-create-home --shell "/bin/false"
# assign directory permissions
chown -R $SERVICE_USER /opt/unimus
chown -R $SERVICE_USER /etc/unimus
chown -R $SERVICE_USER /var/log/unimus
chown $SERVICE_USER /etc/default/unimus |
...
The unit file will already be created and contain some configuration. Do not change it in any other way other than add the below line to the specified section:
Code Block |
---|
|
# /etc/systemd/system/unimus.service
[Unit]
# ... other config here
# ...
[Service]
# ... other config here
# ...
User=unimus-service
[Install]
# ... other config here
# ... |
6) Restart Unimus and validate everything works
Code Block |
---|
|
systemctl start unimus |
How to perform upgrades for non-root deploys
Normally, our installer would over-write your systemd unit file with the latest official version, which would remove your user declaration. To avoid this, you need to run the installer with the "-m" (minimal upgrade) flag. Using this flag will make the installer to only update the application binary ("/opt/unimus/Unimus.jar") and not the other application files.
Code Block |
---|
|
./install-unimus.sh -m |