Allow configuration of user:group through sysconfig
Resolves: rhbz#1344250
This commit is contained in:
parent
4627977151
commit
ea3c76ef2a
@ -2,6 +2,14 @@
|
|||||||
|
|
||||||
. /etc/sysconfig/network
|
. /etc/sysconfig/network
|
||||||
|
|
||||||
|
# Source exim configureation.
|
||||||
|
if [ -f /etc/sysconfig/exim ] ; then
|
||||||
|
. /etc/sysconfig/exim
|
||||||
|
fi
|
||||||
|
|
||||||
|
USER=${USER:=exim}
|
||||||
|
GROUP=${GROUP:=exim}
|
||||||
|
|
||||||
gen_cert() {
|
gen_cert() {
|
||||||
if [ ! -f /etc/pki/tls/certs/exim.pem ] ; then
|
if [ ! -f /etc/pki/tls/certs/exim.pem ] ; then
|
||||||
umask 077
|
umask 077
|
||||||
@ -23,7 +31,7 @@ root@${FQDN}
|
|||||||
EOF
|
EOF
|
||||||
if [ $? -eq 0 ]; then
|
if [ $? -eq 0 ]; then
|
||||||
echo success
|
echo success
|
||||||
chown exim.exim /etc/pki/tls/{private,certs}/exim.pem
|
chown $USER:$GROUP /etc/pki/tls/{private,certs}/exim.pem
|
||||||
chmod 600 /etc/pki/tls/{private,certs}/exim.pem
|
chmod 600 /etc/pki/tls/{private,certs}/exim.pem
|
||||||
else
|
else
|
||||||
echo failure
|
echo failure
|
||||||
|
@ -23,6 +23,9 @@ else
|
|||||||
QUEUE=1h
|
QUEUE=1h
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
USER=${USER:=exim}
|
||||||
|
GROUP=${GROUP:=exim}
|
||||||
|
|
||||||
gen_cert() {
|
gen_cert() {
|
||||||
if [ ! -f /etc/pki/tls/certs/exim.pem ] ; then
|
if [ ! -f /etc/pki/tls/certs/exim.pem ] ; then
|
||||||
umask 077
|
umask 077
|
||||||
@ -44,7 +47,7 @@ root@${FQDN}
|
|||||||
EOF
|
EOF
|
||||||
if [ $? -eq 0 ]; then
|
if [ $? -eq 0 ]; then
|
||||||
success
|
success
|
||||||
chown exim.exim /etc/pki/tls/{private,certs}/exim.pem
|
chown $USER:$GROUP /etc/pki/tls/{private,certs}/exim.pem
|
||||||
chmod 600 /etc/pki/tls/{private,certs}/exim.pem
|
chmod 600 /etc/pki/tls/{private,certs}/exim.pem
|
||||||
else
|
else
|
||||||
failure
|
failure
|
||||||
@ -65,7 +68,7 @@ start() {
|
|||||||
then
|
then
|
||||||
if [ "exim" != "`ls -l /var/log/exim/main.log | awk '{print $4}'`" ]
|
if [ "exim" != "`ls -l /var/log/exim/main.log | awk '{print $4}'`" ]
|
||||||
then
|
then
|
||||||
chown -R exim:exim /var/log/exim /var/spool/exim
|
chown -R $USER:$GROUP /var/log/exim /var/spool/exim
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
Summary: The exim mail transfer agent
|
Summary: The exim mail transfer agent
|
||||||
Name: exim
|
Name: exim
|
||||||
Version: 4.87
|
Version: 4.87
|
||||||
Release: 4%{?dist}
|
Release: 5%{?dist}
|
||||||
License: GPLv2+
|
License: GPLv2+
|
||||||
Url: http://www.exim.org/
|
Url: http://www.exim.org/
|
||||||
Group: System Environment/Daemons
|
Group: System Environment/Daemons
|
||||||
@ -585,6 +585,10 @@ test "$1" = 0 || %{_initrddir}/clamd.exim condrestart >/dev/null 2>&1 || :
|
|||||||
%{_sysconfdir}/cron.daily/greylist-tidy.sh
|
%{_sysconfdir}/cron.daily/greylist-tidy.sh
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Jun 9 2016 Jaroslav Škarvada <jskarvad@redhat.com> - 4.87-5
|
||||||
|
- Allow configuration of user:group through sysconfig
|
||||||
|
Resolves: rhbz#1344250
|
||||||
|
|
||||||
* Sat May 14 2016 Jitka Plesnikova <jplesnik@redhat.com> - 4.87-4
|
* Sat May 14 2016 Jitka Plesnikova <jplesnik@redhat.com> - 4.87-4
|
||||||
- Perl 5.24 rebuild
|
- Perl 5.24 rebuild
|
||||||
|
|
||||||
|
@ -1,2 +1,4 @@
|
|||||||
DAEMON=yes
|
DAEMON=yes
|
||||||
QUEUE=1h
|
QUEUE=1h
|
||||||
|
USER=exim
|
||||||
|
GROUP=exim
|
||||||
|
Loading…
Reference in New Issue
Block a user