Commit 0d349b3a authored by Guido Trotter's avatar Guido Trotter
Browse files

Improve ganeti example cron file

The cron file in ganeti's example directory is now static, and executes
ganeti-watcher in /usr/local/sbin no matter where it's really installed. With
this patch we generate it at build time substituting the right value of
@SBINDIR@ from We also make sure ganeti-watcher exists and is
executable before running it.

This is targeted at 1.2 as well.

Reviewed-by: iustinp
parent 6c8af3d0
EXTRA_DIST = ganeti.cron
nodist_EXTRA_DATA = ganeti.initd
nodist_EXTRA_DATA = ganeti.initd ganeti.cron
all-local: ganeti.initd
all-local: ganeti.initd ganeti.cron
sed \
-e "s#@PREFIX@#$(prefix)#g" \
-e "s#@SYSCONFDIR@#$(sysconfdir)#g" \
-e "s#@LOCALSTATEDIR@#$(localstatedir)#g" \
-e "s#@SBINDIR@#$(sbindir)#g" \
< $< > $@
# restart failed instances
*/5 * * * * root /usr/local/sbin/ganeti-watcher
*/5 * * * * root [ -x @SBINDIR@/ganeti-watcher ] && @SBINDIR@/ganeti-watcher
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment