Skip to content

Commit

Permalink
Merge pull request #78 from guidograzioli/systemd_unit_user
Browse files Browse the repository at this point in the history
Set systemd unit to run with `activemq_system_user` user
  • Loading branch information
guidograzioli authored Jun 22, 2023
2 parents 7fca2a5 + 4a7c528 commit 83d793b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions roles/activemq/tasks/install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,8 @@
state: link
src: "{{ activemq_dest }}/{{ new_version_extracted.files | first }}"
dest: "{{ activemq.home }}"
owner: "{{ activemq_service_user }}"
group: "{{ activemq_service_group }}"
when:
- not path_to_workdir_after_extract.stat.exists

Expand Down
2 changes: 2 additions & 0 deletions roles/activemq/templates/amq_broker.service.j2
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ RequiresMountsFor={{ activemq_shared_storage_path }}
{% endif %}

[Service]
User={{ activemq_service_user }}
Group={{ activemq_service_group }}
Type=forking
EnvironmentFile=-/etc/sysconfig/{{ activemq.instance_name }}
PIDFile={{ activemq.instance_home }}/{{ activemq_service_pidfile }}
Expand Down

0 comments on commit 83d793b

Please sign in to comment.