# Question - only if your configuration files are changed

**URL:** <https://discourse.chef.io/t/question-only-if-your-configuration-files-are-changed/3581>\
**Category:** Chef Infra (archive)\
**Created:** [February 7, 2013, 11:50am UTC](https://discourse.chef.io/t/question-only-if-your-configuration-files-are-changed/3581 "2013-02-07T11:50:11Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alex\_Vitola](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/alex_vitola/32/591_2.png) [@Alex\_Vitola](https://discourse.chef.io/u/Alex_Vitola)\
**Post date:** [February 7, 2013, 11:50am UTC](https://discourse.chef.io/t/question-only-if-your-configuration-files-are-changed/3581/1 "2013-02-07T11:50:11Z")

</div>

How do I restarting a service only if your configuration files are changed

Example: ntp service

---

<div class="post-metadata">

**Author:** ![Mike](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/mike/32/18_2.png) [@Mike](https://discourse.chef.io/u/Mike)\
**Post date:** [February 7, 2013, 1:18pm UTC](https://discourse.chef.io/t/question-only-if-your-configuration-files-are-changed/3581/2 "2013-02-07T13:18:34Z")

</div>

See here, from the opsocde ntp cookbook:

> <https://github.com/sous-chefs/ntp/blob/main/recipes/default.rb#L44-L50>

On Thu, Feb 7, 2013 at 6:50 AM, Alex Vitola [alex.vitola@gmail.com](mailto:alex.vitola@gmail.com) wrote:

> How do I restarting a service only if your configuration files are changed
> 
> Example: ntp service

---

<div class="post-metadata">

**Author:** ![Spike\_Grobstein](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/spike_grobstein/32/567_2.png) [@Spike\_Grobstein](https://discourse.chef.io/u/Spike_Grobstein)\
**Post date:** [February 7, 2013, 1:33pm UTC](https://discourse.chef.io/t/question-only-if-your-configuration-files-are-changed/3581/3 "2013-02-07T13:33:54Z")

</div>

I've often wondered this myself. I currently keep one backup of the config and restart only if the current and the backup differ, but its incredibly hacky and doesn't work if you put a "configured by chef" time stamp at the top.

It doesn't appear that that recipe only restarts if the file is changed. Or am I missing something?

...spike  
(Sent via handheld, please pardon spelling errors)

On Feb 7, 2013, at 8:18 AM, Mike [miketheman@gmail.com](mailto:miketheman@gmail.com) wrote:

> See here, from the opsocde ntp cookbook:  
> [ntp/recipes/default.rb at main · sous-chefs/ntp · GitHub](https://github.com/opscode-cookbooks/ntp/blob/master/recipes/default.rb#L44-L50)
> 
> On Thu, Feb 7, 2013 at 6:50 AM, Alex Vitola [alex.vitola@gmail.com](mailto:alex.vitola@gmail.com) wrote:
> 
> > How do I restarting a service only if your configuration files are changed
> > 
> > Example: ntp service

---

<div class="post-metadata">

**Author:** ![Alex\_Vitola](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/alex_vitola/32/591_2.png) [@Alex\_Vitola](https://discourse.chef.io/u/Alex_Vitola)\
**Post date:** [February 7, 2013, 1:50pm UTC](https://discourse.chef.io/t/question-only-if-your-configuration-files-are-changed/3581/4 "2013-02-07T13:50:33Z")

</div>

Perfect Mike

Tks

2013/2/7 Mike [miketheman@gmail.com](mailto:miketheman@gmail.com):

> See here, from the opsocde ntp cookbook:  
> [https://github.com/opscode-cookbooks/ntp/blob/master/recipes/default.rb#L44-L50](https://github.com/opscode-cookbooks/ntp/blob/master/recipes/default.rb#L44-L50)
> 
> On Thu, Feb 7, 2013 at 6:50 AM, Alex Vitola [alex.vitola@gmail.com](mailto:alex.vitola@gmail.com) wrote:
> 
> > How do I restarting a service only if your configuration files are changed
> > 
> > Example: ntp service

---

<div class="post-metadata">

**Author:** ![werebus](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/werebus/32/24_2.png) [@werebus](https://discourse.chef.io/u/werebus)\
**Post date:** [February 7, 2013, 1:50pm UTC](https://discourse.chef.io/t/question-only-if-your-configuration-files-are-changed/3581/5 "2013-02-07T13:50:48Z")

</div>

Yes, the link Mike gave is exactly how you achieve this.

Resources only "notify" when they needed to do something to get your system  
into the state that they describe. So, in this example IF "/etc/ntp.conf"  
is modified by Chef, then it will notify the ntp service resource to  
perform its "restart" action.

More information on notifications here:  
[http://docs.opscode.com/chef/resources.html#notifications](http://docs.opscode.com/chef/resources.html#notifications)

-Matt Moretti

On Thu, Feb 7, 2013 at 8:33 AM, Spike Grobstein  
[spike@ticketevolution.com](mailto:spike@ticketevolution.com)wrote:

> I've often wondered this myself. I currently keep one backup of the config  
> and restart only if the current and the backup differ, but its incredibly  
> hacky and doesn't work if you put a "configured by chef" time stamp at the  
> top.
> 
> It doesn't appear that that recipe only restarts if the file is changed.  
> Or am I missing something?
> 
> ...spike  
> (Sent via handheld, please pardon spelling errors)
> 
> On Feb 7, 2013, at 8:18 AM, Mike [miketheman@gmail.com](mailto:miketheman@gmail.com) wrote:
> 
> > See here, from the opsocde ntp cookbook:
> 
> [https://github.com/opscode-cookbooks/ntp/blob/master/recipes/default.rb#L44-L50](https://github.com/opscode-cookbooks/ntp/blob/master/recipes/default.rb#L44-L50)
> 
> > On Thu, Feb 7, 2013 at 6:50 AM, Alex Vitola [alex.vitola@gmail.com](mailto:alex.vitola@gmail.com)  
> > wrote:
> > 
> > > How do I restarting a service only if your configuration files are  
> > > changed
> > > 
> > > Example: ntp service

---

<div class="post-metadata">

**Author:** ![Thom\_May](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/thom_may/32/130_2.png) [@Thom\_May](https://discourse.chef.io/u/Thom_May)\
**Post date:** [February 7, 2013, 2:03pm UTC](https://discourse.chef.io/t/question-only-if-your-configuration-files-are-changed/3581/6 "2013-02-07T14:03:18Z")

</div>

note that if you put a timestamp in the template, you'll get a notification  
every time, since chef will update the timestamp every time it runs.

On Thu, Feb 7, 2013 at 1:33 PM, Spike Grobstein  
[spike@ticketevolution.com](mailto:spike@ticketevolution.com)wrote:

> I've often wondered this myself. I currently keep one backup of the config  
> and restart only if the current and the backup differ, but its incredibly  
> hacky and doesn't work if you put a "configured by chef" time stamp at the  
> top.
> 
> It doesn't appear that that recipe only restarts if the file is changed.  
> Or am I missing something?
> 
> ...spike  
> (Sent via handheld, please pardon spelling errors)
> 
> On Feb 7, 2013, at 8:18 AM, Mike [miketheman@gmail.com](mailto:miketheman@gmail.com) wrote:
> 
> > See here, from the opsocde ntp cookbook:
> 
> [ntp/recipes/default.rb at main · sous-chefs/ntp · GitHub](https://github.com/opscode-cookbooks/ntp/blob/master/recipes/default.rb#L44-L50)
> 
> > On Thu, Feb 7, 2013 at 6:50 AM, Alex Vitola [alex.vitola@gmail.com](mailto:alex.vitola@gmail.com)  
> > wrote:
> > 
> > > How do I restarting a service only if your configuration files are  
> > > changed
> > > 
> > > Example: ntp service

---

<div class="post-metadata">

**Author:** ![Mike](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/mike/32/18_2.png) [@Mike](https://discourse.chef.io/u/Mike)\
**Post date:** [February 7, 2013, 2:06pm UTC](https://discourse.chef.io/t/question-only-if-your-configuration-files-are-changed/3581/7 "2013-02-07T14:06:46Z")

</div>

+1 to Thom.

Spike - Since Chef keeps some backups around of previous version in  
/var/cache/chef typically (you can also see the filename in a chef run  
with debug where something changes), there's no need to timestamp your  
file.  
Also, leveraging filesytem mtime to see when a file was changed is useful.

If you were statically entering a date/time of an Operator change -  
say, add "2013-02-07 Mike added a new gadget" to your file as a  
changelog, that might be useful, but also might be more effort than  
it's worth - that stuff typically lives in our source control history  
anyways.

-M

On Thu, Feb 7, 2013 at 9:03 AM, Thom May [thom@clearairturbulence.org](mailto:thom@clearairturbulence.org) wrote:

> note that if you put a timestamp in the template, you'll get a notification  
> every time, since chef will update the timestamp every time it runs.
> 
> On Thu, Feb 7, 2013 at 1:33 PM, Spike Grobstein [spike@ticketevolution.com](mailto:spike@ticketevolution.com)  
> wrote:
> 
> > I've often wondered this myself. I currently keep one backup of the config  
> > and restart only if the current and the backup differ, but its incredibly  
> > hacky and doesn't work if you put a "configured by chef" time stamp at the  
> > top.
> > 
> > It doesn't appear that that recipe only restarts if the file is changed.  
> > Or am I missing something?
> > 
> > ...spike  
> > (Sent via handheld, please pardon spelling errors)
> > 
> > On Feb 7, 2013, at 8:18 AM, Mike [miketheman@gmail.com](mailto:miketheman@gmail.com) wrote:
> > 
> > > See here, from the opsocde ntp cookbook:
> > > 
> > > [ntp/recipes/default.rb at main · sous-chefs/ntp · GitHub](https://github.com/opscode-cookbooks/ntp/blob/master/recipes/default.rb#L44-L50)
> > > 
> > > On Thu, Feb 7, 2013 at 6:50 AM, Alex Vitola [alex.vitola@gmail.com](mailto:alex.vitola@gmail.com)  
> > > wrote:
> > > 
> > > > How do I restarting a service only if your configuration files are  
> > > > changed
> > > > 
> > > > Example: ntp service

---

<div class="post-metadata">

**Author:** ![Spike\_Grobstein](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/spike_grobstein/32/567_2.png) [@Spike\_Grobstein](https://discourse.chef.io/u/Spike_Grobstein)\
**Post date:** [February 7, 2013, 2:19pm UTC](https://discourse.chef.io/t/question-only-if-your-configuration-files-are-changed/3581/8 "2013-02-07T14:19:22Z")

</div>

Interesting.

So how do the internals of this work? Does chef generate a new output file in a temp folder, compare the new file to the old file, then if they differ, update and notify?

I was always under the impression that this would notify every single time, so I was incredibly apprehensive about doing this on our postgres and redis production servers.

Thanks for the info. You've seriously just simplified my life.

...spike

On Feb 7, 2013, at 9:06 AM, Mike wrote:

> +1 to Thom.
> 
> Spike - Since Chef keeps some backups around of previous version in  
> /var/cache/chef typically (you can also see the filename in a chef run  
> with debug where something changes), there's no need to timestamp your  
> file.  
> Also, leveraging filesytem mtime to see when a file was changed is useful.
> 
> If you were statically entering a date/time of an Operator change -  
> say, add "2013-02-07 Mike added a new gadget" to your file as a  
> changelog, that might be useful, but also might be more effort than  
> it's worth - that stuff typically lives in our source control history  
> anyways.
> 
> -M
> 
> On Thu, Feb 7, 2013 at 9:03 AM, Thom May [thom@clearairturbulence.org](mailto:thom@clearairturbulence.org) wrote:
> 
> > note that if you put a timestamp in the template, you'll get a notification  
> > every time, since chef will update the timestamp every time it runs.
> > 
> > On Thu, Feb 7, 2013 at 1:33 PM, Spike Grobstein [spike@ticketevolution.com](mailto:spike@ticketevolution.com)  
> > wrote:
> > 
> > > I've often wondered this myself. I currently keep one backup of the config  
> > > and restart only if the current and the backup differ, but its incredibly  
> > > hacky and doesn't work if you put a "configured by chef" time stamp at the  
> > > top.
> > > 
> > > It doesn't appear that that recipe only restarts if the file is changed.  
> > > Or am I missing something?
> > > 
> > > ...spike  
> > > (Sent via handheld, please pardon spelling errors)
> > > 
> > > On Feb 7, 2013, at 8:18 AM, Mike [miketheman@gmail.com](mailto:miketheman@gmail.com) wrote:
> > > 
> > > > See here, from the opsocde ntp cookbook:
> > > > 
> > > > [ntp/recipes/default.rb at main · sous-chefs/ntp · GitHub](https://github.com/opscode-cookbooks/ntp/blob/master/recipes/default.rb#L44-L50)
> > > > 
> > > > On Thu, Feb 7, 2013 at 6:50 AM, Alex Vitola [alex.vitola@gmail.com](mailto:alex.vitola@gmail.com)  
> > > > wrote:
> > > > 
> > > > > How do I restarting a service only if your configuration files are  
> > > > > changed
> > > > > 
> > > > > Example: ntp service

---

<div class="post-metadata">

**Author:** ![Mike](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/mike/32/18_2.png) [@Mike](https://discourse.chef.io/u/Mike)\
**Post date:** [February 7, 2013, 2:27pm UTC](https://discourse.chef.io/t/question-only-if-your-configuration-files-are-changed/3581/9 "2013-02-07T14:27:46Z")

</div>

If you're interested in the internals, here's the code (for Chef 11,  
although I don't think it changed significantly since Chef 10).

> <https://github.com/chef/chef/blob/main/lib/chef/provider/template.rb#L51-L76>

> <https://github.com/chef/chef/blob/main/lib/chef/provider/file.rb#L275-L302>

The 'template' provider inherits the 'file' provider and uses the  
'backup' method from 'file'.

-M

On Thu, Feb 7, 2013 at 9:19 AM, Spike Grobstein  
[spike@ticketevolution.com](mailto:spike@ticketevolution.com) wrote:

> Interesting.
> 
> So how do the internals of this work? Does chef generate a new output file in a temp folder, compare the new file to the old file, then if they differ, update and notify?
> 
> I was always under the impression that this would notify every single time, so I was incredibly apprehensive about doing this on our postgres and redis production servers.
> 
> Thanks for the info. You've seriously just simplified my life.
> 
> ...spike
> 
> On Feb 7, 2013, at 9:06 AM, Mike wrote:
> 
> > +1 to Thom.
> > 
> > Spike - Since Chef keeps some backups around of previous version in  
> > /var/cache/chef typically (you can also see the filename in a chef run  
> > with debug where something changes), there's no need to timestamp your  
> > file.  
> > Also, leveraging filesytem mtime to see when a file was changed is useful.
> > 
> > If you were statically entering a date/time of an Operator change -  
> > say, add "2013-02-07 Mike added a new gadget" to your file as a  
> > changelog, that might be useful, but also might be more effort than  
> > it's worth - that stuff typically lives in our source control history  
> > anyways.
> > 
> > -M
> > 
> > On Thu, Feb 7, 2013 at 9:03 AM, Thom May [thom@clearairturbulence.org](mailto:thom@clearairturbulence.org) wrote:
> > 
> > > note that if you put a timestamp in the template, you'll get a notification  
> > > every time, since chef will update the timestamp every time it runs.
> > > 
> > > On Thu, Feb 7, 2013 at 1:33 PM, Spike Grobstein [spike@ticketevolution.com](mailto:spike@ticketevolution.com)  
> > > wrote:
> > > 
> > > > I've often wondered this myself. I currently keep one backup of the config  
> > > > and restart only if the current and the backup differ, but its incredibly  
> > > > hacky and doesn't work if you put a "configured by chef" time stamp at the  
> > > > top.
> > > > 
> > > > It doesn't appear that that recipe only restarts if the file is changed.  
> > > > Or am I missing something?
> > > > 
> > > > ...spike  
> > > > (Sent via handheld, please pardon spelling errors)
> > > > 
> > > > On Feb 7, 2013, at 8:18 AM, Mike [miketheman@gmail.com](mailto:miketheman@gmail.com) wrote:
> > > > 
> > > > > See here, from the opsocde ntp cookbook:
> > > > > 
> > > > > [https://github.com/opscode-cookbooks/ntp/blob/master/recipes/default.rb#L44-L50](https://github.com/opscode-cookbooks/ntp/blob/master/recipes/default.rb#L44-L50)
> > > > > 
> > > > > On Thu, Feb 7, 2013 at 6:50 AM, Alex Vitola [alex.vitola@gmail.com](mailto:alex.vitola@gmail.com)  
> > > > > wrote:
> > > > > 
> > > > > > How do I restarting a service only if your configuration files are  
> > > > > > changed
> > > > > > 
> > > > > > Example: ntp service

---

<div class="post-metadata">

**Author:** ![Jesse\_Campbell](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/jesse_campbell/32/251_2.png) [@Jesse\_Campbell](https://discourse.chef.io/u/Jesse_Campbell)\
**Post date:** [February 7, 2013, 3:17pm UTC](https://discourse.chef.io/t/question-only-if-your-configuration-files-are-changed/3581/10 "2013-02-07T15:17:12Z")

</div>

essentially it generates a new file, generates an MD5-like hash of the  
file, and compares that to the MD5-like hash of the existing file, and if  
changed update and notify.

internally, it may generate the MD5-like hash against a raw string, rather  
than writing it out to a file first, but that depends on which resource is  
being used.  
"remote\_file", for example, generally fetches the remote into a local  
tempfile and takes the hash of that. "template" and "file" generally work  
from the generated string, cookbook\_file already knows the hash because it  
was generated when uploading the cookbook to the chef server... there are  
more.

On Thu, Feb 7, 2013 at 9:19 AM, Spike Grobstein  
[spike@ticketevolution.com](mailto:spike@ticketevolution.com)wrote:

> Interesting.
> 
> So how do the internals of this work? Does chef generate a new output file  
> in a temp folder, compare the new file to the old file, then if they  
> differ, update and notify?
> 
> I was always under the impression that this would notify every single  
> time, so I was incredibly apprehensive about doing this on our postgres and  
> redis production servers.
> 
> Thanks for the info. You've seriously just simplified my life.
> 
> ...spike
> 
> On Feb 7, 2013, at 9:06 AM, Mike wrote:
> 
> > +1 to Thom.
> > 
> > Spike - Since Chef keeps some backups around of previous version in  
> > /var/cache/chef typically (you can also see the filename in a chef run  
> > with debug where something changes), there's no need to timestamp your  
> > file.  
> > Also, leveraging filesytem mtime to see when a file was changed is  
> > useful.
> > 
> > If you were statically entering a date/time of an Operator change -  
> > say, add "2013-02-07 Mike added a new gadget" to your file as a  
> > changelog, that might be useful, but also might be more effort than  
> > it's worth - that stuff typically lives in our source control history  
> > anyways.
> > 
> > -M
> > 
> > On Thu, Feb 7, 2013 at 9:03 AM, Thom May [thom@clearairturbulence.org](mailto:thom@clearairturbulence.org)  
> > wrote:
> > 
> > > note that if you put a timestamp in the template, you'll get a  
> > > notification  
> > > every time, since chef will update the timestamp every time it runs.
> > > 
> > > On Thu, Feb 7, 2013 at 1:33 PM, Spike Grobstein \<  
> > > [spike@ticketevolution.com](mailto:spike@ticketevolution.com)\>  
> > > wrote:
> > > 
> > > > I've often wondered this myself. I currently keep one backup of the  
> > > > config  
> > > > and restart only if the current and the backup differ, but its  
> > > > incredibly  
> > > > hacky and doesn't work if you put a "configured by chef" time stamp at  
> > > > the  
> > > > top.
> > > > 
> > > > It doesn't appear that that recipe only restarts if the file is  
> > > > changed.  
> > > > Or am I missing something?
> > > > 
> > > > ...spike  
> > > > (Sent via handheld, please pardon spelling errors)
> > > > 
> > > > On Feb 7, 2013, at 8:18 AM, Mike [miketheman@gmail.com](mailto:miketheman@gmail.com) wrote:
> > > > 
> > > > > See here, from the opsocde ntp cookbook:
> 
> [ntp/recipes/default.rb at main · sous-chefs/ntp · GitHub](https://github.com/opscode-cookbooks/ntp/blob/master/recipes/default.rb#L44-L50)
> 
> > > > > On Thu, Feb 7, 2013 at 6:50 AM, Alex Vitola [alex.vitola@gmail.com](mailto:alex.vitola@gmail.com)  
> > > > > wrote:
> > > > > 
> > > > > > How do I restarting a service only if your configuration files are  
> > > > > > changed
> > > > > > 
> > > > > > Example: ntp service

---

<div class="post-metadata">

**Author:** ![Joshua\_Timberman](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/joshua_timberman/32/424_2.png) [@Joshua\_Timberman](https://discourse.chef.io/u/Joshua_Timberman)\
**Post date:** [February 8, 2013, 6:29am UTC](https://discourse.chef.io/t/question-only-if-your-configuration-files-are-changed/3581/11 "2013-02-08T06:29:45Z")

</div>

The checksum of the rendered file content and target file is SHA256, specifically.

--  
Joshua Timberman

On Thursday, February 7, 2013 at 8:17, Jesse Campbell wrote:

> essentially it generates a new file, generates an MD5-like hash of the file, and compares that to the MD5-like hash of the existing file, and if changed update and notify.
> 
> internally, it may generate the MD5-like hash against a raw string, rather than writing it out to a file first, but that depends on which resource is being used.  
> "remote\_file", for example, generally fetches the remote into a local tempfile and takes the hash of that. "template" and "file" generally work from the generated string, cookbook\_file already knows the hash because it was generated when uploading the cookbook to the chef server... there are more.
> 
> On Thu, Feb 7, 2013 at 9:19 AM, Spike Grobstein \<[spike@ticketevolution.com](mailto:spike@ticketevolution.com) ([mailto:spike@ticketevolution.com](mailto:spike@ticketevolution.com))\> wrote:
> 
> > Interesting.
> > 
> > So how do the internals of this work? Does chef generate a new output file in a temp folder, compare the new file to the old file, then if they differ, update and notify?
> > 
> > I was always under the impression that this would notify every single time, so I was incredibly apprehensive about doing this on our postgres and redis production servers.
> > 
> > Thanks for the info. You've seriously just simplified my life.
> > 
> > ...spike
> > 
> > On Feb 7, 2013, at 9:06 AM, Mike wrote:
> > 
> > > +1 to Thom.
> > > 
> > > Spike - Since Chef keeps some backups around of previous version in  
> > > /var/cache/chef typically (you can also see the filename in a chef run  
> > > with debug where something changes), there's no need to timestamp your  
> > > file.  
> > > Also, leveraging filesytem mtime to see when a file was changed is useful.
> > > 
> > > If you were statically entering a date/time of an Operator change -  
> > > say, add "2013-02-07 Mike added a new gadget" to your file as a  
> > > changelog, that might be useful, but also might be more effort than  
> > > it's worth - that stuff typically lives in our source control history  
> > > anyways.
> > > 
> > > -M
> > > 
> > > On Thu, Feb 7, 2013 at 9:03 AM, Thom May \<[thom@clearairturbulence.org](mailto:thom@clearairturbulence.org) ([mailto:thom@clearairturbulence.org](mailto:thom@clearairturbulence.org))\> wrote:
> > > 
> > > > note that if you put a timestamp in the template, you'll get a notification  
> > > > every time, since chef will update the timestamp every time it runs.
> > > > 
> > > > On Thu, Feb 7, 2013 at 1:33 PM, Spike Grobstein \<[spike@ticketevolution.com](mailto:spike@ticketevolution.com) ([mailto:spike@ticketevolution.com](mailto:spike@ticketevolution.com))\>  
> > > > wrote:
> > > > 
> > > > > I've often wondered this myself. I currently keep one backup of the config  
> > > > > and restart only if the current and the backup differ, but its incredibly  
> > > > > hacky and doesn't work if you put a "configured by chef" time stamp at the  
> > > > > top.
> > > > > 
> > > > > It doesn't appear that that recipe only restarts if the file is changed.  
> > > > > Or am I missing something?
> > > > > 
> > > > > ...spike  
> > > > > (Sent via handheld, please pardon spelling errors)
> > > > > 
> > > > > On Feb 7, 2013, at 8:18 AM, Mike \<[miketheman@gmail.com](mailto:miketheman@gmail.com) ([mailto:miketheman@gmail.com](mailto:miketheman@gmail.com))\> wrote:
> > > > > 
> > > > > > See here, from the opsocde ntp cookbook:
> > > > > > 
> > > > > > [ntp/recipes/default.rb at main · sous-chefs/ntp · GitHub](https://github.com/opscode-cookbooks/ntp/blob/master/recipes/default.rb#L44-L50)
> > > > > > 
> > > > > > On Thu, Feb 7, 2013 at 6:50 AM, Alex Vitola \<[alex.vitola@gmail.com](mailto:alex.vitola@gmail.com) ([mailto:alex.vitola@gmail.com](mailto:alex.vitola@gmail.com))\>  
> > > > > > wrote:
> > > > > > 
> > > > > > > How do I restarting a service only if your configuration files are  
> > > > > > > changed
> > > > > > > 
> > > > > > > Example: ntp service
