Skip to content

Commit

Permalink
Update home directory for RHEL6 and assign ZTPServer files to ztpserv…
Browse files Browse the repository at this point in the history
…er user
  • Loading branch information
phil-dileo committed Jan 27, 2015
1 parent d31b0b1 commit 984dbd3
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions rpm/ztpserver.spec
Original file line number Diff line number Diff line change
Expand Up @@ -137,9 +137,15 @@ exit 0
%post
# Ensure the server can read/write the necessary files.
# ZTPServer operators may be put in to this group to allow them to configure the service
%if 0%{?rhel} == 6
chown -R %{app_user}:%{app_user} %{apphomedir}/ztpserver
chmod -R ug+rw %{apphomedir}/ztpserver
chcon -Rv --type=httpd_sys_content_t %{apphomedir}/ztpserver
%else
chown -R %{app_user}:%{app_user} %{_datadir}/ztpserver
chmod -R ug+rw %{_datadir}/ztpserver
chcon -Rv --type=httpd_sys_content_t %{_datadir}/ztpserver
%endif

%preun
# $1 --> if 0, then it is a deinstall
Expand Down

0 comments on commit 984dbd3

Please sign in to comment.