diff --git a/distros/redhat/CMakeLists.txt b/distros/redhat/CMakeLists.txt index df3edf7d9..f8acef552 100644 --- a/distros/redhat/CMakeLists.txt +++ b/distros/redhat/CMakeLists.txt @@ -49,10 +49,8 @@ endif("${unzip_jsc}" STREQUAL "") file(MAKE_DIRECTORY sock swap zoneminder zoneminder-upload events images temp) # Install the empty folders -#install(DIRECTORY run DESTINATION /var DIRECTORY_PERMISSIONS OWNER_WRITE OWNER_READ OWNER_EXECUTE GROUP_WRITE GROUP_READ GROUP_EXECUTE WORLD_WRITE WORLD_READ WORLD_EXECUTE) install(DIRECTORY sock swap DESTINATION /var/lib/zoneminder DIRECTORY_PERMISSIONS OWNER_WRITE OWNER_READ OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) install(DIRECTORY zoneminder DESTINATION /var/log DIRECTORY_PERMISSIONS OWNER_WRITE OWNER_READ OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) -install(DIRECTORY zoneminder DESTINATION /run DIRECTORY_PERMISSIONS OWNER_WRITE OWNER_READ OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) install(DIRECTORY zoneminder-upload DESTINATION /var/spool DIRECTORY_PERMISSIONS OWNER_WRITE OWNER_READ OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) install(DIRECTORY events images temp DESTINATION /var/lib/zoneminder DIRECTORY_PERMISSIONS OWNER_WRITE OWNER_READ OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) diff --git a/distros/redhat/nginx/zoneminder.service.in b/distros/redhat/nginx/zoneminder.service.in index da569423d..7e2e36585 100644 --- a/distros/redhat/nginx/zoneminder.service.in +++ b/distros/redhat/nginx/zoneminder.service.in @@ -8,12 +8,15 @@ Requires=mariadb.service nginx.service php-fpm.service fcgiwrap.service [Service] User=@WEB_USER@ +Group=@WEB_GROUP@ Type=forking ExecStart=@BINDIR@/zmpkg.pl start ExecReload=@BINDIR@/zmpkg.pl restart ExecStop=@BINDIR@/zmpkg.pl stop PIDFile=@ZM_RUNDIR@/zm.pid Environment=TZ=/etc/localtime +RuntimeDirectory=zoneminder +RuntimeDirectoryMode=0755 [Install] WantedBy=multi-user.target diff --git a/distros/redhat/systemd/zoneminder.service.in b/distros/redhat/systemd/zoneminder.service.in index 030ca8065..2234af036 100644 --- a/distros/redhat/systemd/zoneminder.service.in +++ b/distros/redhat/systemd/zoneminder.service.in @@ -7,12 +7,15 @@ Requires=mariadb.service httpd.service [Service] User=@WEB_USER@ +Group=@WEB_GROUP@ Type=forking ExecStart=@BINDIR@/zmpkg.pl start ExecReload=@BINDIR@/zmpkg.pl restart ExecStop=@BINDIR@/zmpkg.pl stop PIDFile=@ZM_RUNDIR@/zm.pid Environment=TZ=/etc/localtime +RuntimeDirectory=zoneminder +RuntimeDirectoryMode=0755 [Install] WantedBy=multi-user.target diff --git a/distros/redhat/zoneminder.spec b/distros/redhat/zoneminder.spec index 58a5a1a44..ad8615d06 100644 --- a/distros/redhat/zoneminder.spec +++ b/distros/redhat/zoneminder.spec @@ -5,10 +5,10 @@ %{!?make_build: %global make_build %{__make} %{?_smp_mflags} } %if "%{zmuid_final}" == "nginx" - %global with_nginx 1 - %global wwwconfdir /etc/nginx/default.d +%global with_nginx 1 +%global wwwconfdir /etc/nginx/default.d %else - %global wwwconfdir /etc/httpd/conf.d +%global wwwconfdir /etc/httpd/conf.d %endif %global sslcert %{_sysconfdir}/pki/tls/certs/localhost.crt @@ -50,6 +50,7 @@ Source: ZoneMinder-%{version}.tar.gz %{?with_init_systemd:BuildRequires: systemd-devel mariadb-devel perl-podlators} %{?with_init_sysv:BuildRequires: mysql-devel} BuildRequires: cmake >= 2.8.7 +BuildRequires: perl-generators BuildRequires: gnutls-devel bzip2-devel BuildRequires: pcre-devel libjpeg-turbo-devel BuildRequires: perl(Archive::Tar) perl(Archive::Zip) @@ -301,7 +302,7 @@ rm -rf %{_docdir}/%{name}-%{version} %dir %attr(755,%{zmuid_final},%{zmgid_final}) %{_sharedstatedir}/zoneminder/temp %dir %attr(755,%{zmuid_final},%{zmgid_final}) /var/log/zoneminder %dir %attr(755,%{zmuid_final},%{zmgid_final}) /var/spool/zoneminder-upload -%dir %attr(755,%{zmuid_final},%{zmgid_final}) %ghost /run/zoneminder +%dir %attr(755,%{zmuid_final},%{zmgid_final}) %ghost /var/run/zoneminder %changelog * Wed Dec 28 2016 Andrew Bauer - 1.30.1-2