Merge pull request #94 from alxwr/service-restart
fix(service): restart service on package change
This commit is contained in:
commit
0f1ad60500
@ -17,6 +17,16 @@ postfix:
|
|||||||
- watch:
|
- watch:
|
||||||
- pkg: postfix
|
- pkg: postfix
|
||||||
|
|
||||||
|
{%- if salt['pillar.get']('postfix:reload_service', True) %}
|
||||||
|
# Restart postfix if the package was changed.
|
||||||
|
# This also provides an ID to be used in a watch_in statement.
|
||||||
|
postfix_service_restart:
|
||||||
|
service.running:
|
||||||
|
- name: postfix
|
||||||
|
- watch:
|
||||||
|
- pkg: postfix
|
||||||
|
{%- endif %}
|
||||||
|
|
||||||
{# Used for newaliases, postalias and postconf #}
|
{# Used for newaliases, postalias and postconf #}
|
||||||
{%- set default_database_type = salt['pillar.get']('postfix:config:default_database_type', 'hash') %}
|
{%- set default_database_type = salt['pillar.get']('postfix:config:default_database_type', 'hash') %}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user