mirror of
https://github.com/saltstack/salt.git
synced 2025-04-16 09:40:20 +00:00
Create empty log for salt-api
Creates empty log for salt-api owned by salt user in same way we do for the master and salt-cloud
This commit is contained in:
parent
25c5a8e8d8
commit
194e1a4603
3 changed files with 18 additions and 0 deletions
|
@ -29,6 +29,7 @@
|
|||
rotate 7
|
||||
compress
|
||||
notifempty
|
||||
create 0640 salt salt
|
||||
}
|
||||
|
||||
/var/log/salt/syndic {
|
||||
|
|
9
pkg/debian/salt-api.postinst
Normal file
9
pkg/debian/salt-api.postinst
Normal file
|
@ -0,0 +1,9 @@
|
|||
case "$1" in
|
||||
configure)
|
||||
if [ ! -e "/var/log/salt/api" ]; then
|
||||
touch /var/log/salt/api
|
||||
chmod 640 /var/log/salt/api
|
||||
fi
|
||||
chown salt:salt /var/log/salt/api
|
||||
;;
|
||||
esac
|
|
@ -493,6 +493,14 @@ fi
|
|||
chown -R %{_SALT_USER}:%{_SALT_GROUP} /etc/salt/pki/master /etc/salt/master.d /var/log/salt/master /var/cache/salt/master /var/run/salt/master
|
||||
|
||||
|
||||
%posttrans api
|
||||
if [ ! -e "/var/log/salt/api" ]; then
|
||||
touch /var/log/salt/api
|
||||
chmod 640 /var/log/salt/api
|
||||
fi
|
||||
chown %{_SALT_USER}:%{_SALT_GROUP} /var/log/salt/api
|
||||
|
||||
|
||||
%preun
|
||||
if [ $1 -eq 0 ]; then
|
||||
# Uninstall
|
||||
|
|
Loading…
Add table
Reference in a new issue