File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change 88AGENT_EXE=" /usr/bin/nginx-agent"
99AGENT_RUN_DIR=" /var/run/nginx-agent"
1010AGENT_LOG_DIR=" /var/log/nginx-agent"
11+ AGENT_ETC_DIR=" /etc/nginx-agent"
12+ AGENT_LIB_DIR=" /var/lib/nginx-agent/"
1113AGENT_UNIT_LOCATION=" /etc/systemd/system"
1214AGENT_UNIT_FILE=" nginx-agent.service"
1315AGENT_USER=$( id -nu)
@@ -123,6 +125,11 @@ create_run_dir() {
123125 chown " ${AGENT_USER} " :" ${AGENT_GROUP} " " ${AGENT_RUN_DIR} "
124126}
125127
128+ update_user_groups () {
129+ printf " PostInstall: Modifying group ownership of NGINX Agent directories \n"
130+ chown -R " ${AGENT_USER} " :" ${AGENT_GROUP} " " ${AGENT_LOG_DIR} " " ${AGENT_ETC_DIR} " " ${AGENT_LIB_DIR} "
131+ }
132+
126133update_unit_file () {
127134 # Fill in data to unit file that's acquired post install
128135 if command -V systemctl > /dev/null 2>&1 ; then
@@ -182,6 +189,7 @@ summary() {
182189 ensure_agent_path
183190 create_agent_group
184191 create_run_dir
192+ update_user_groups
185193 update_unit_file
186194 restart_agent_if_required
187195 summary
You can’t perform that action at this time.
0 commit comments