Skip to content

Instantly share code, notes, and snippets.

@tjl2
Created May 25, 2011 14:44
Show Gist options
  • Save tjl2/991101 to your computer and use it in GitHub Desktop.
Save tjl2/991101 to your computer and use it in GitHub Desktop.
service "vixie-cron"
service "sysklogd"
service "nginx"
link "/etc/localtime" do
to "/usr/share/zoneinfo/GB"
notifies :restart, resources(:service => ["vixie-cron", "sysklogd", "nginx"]), :delayed
not_if "readlink /etc/localtime | grep -q 'GB$'"
end
@jimneath
Copy link

service "example_service" do
action :restart
end

@tjl2
Copy link
Author

tjl2 commented May 25, 2011

Have edited this to show how I did it in the end. Works well!

@jimneath
Copy link

Nice.

I don't think you need the :delayed on there, as that's the default.

@tjl2
Copy link
Author

tjl2 commented May 25, 2011

Ah right, might take that off then - although I think it's nice to be explicit (in which case, I should change it to :cunt - that's pretty explicit!)

@jimneath
Copy link

Quim.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment