Which operating systems besides Ubuntu use it?
Ubuntu – Upstart
initupstart
Related Solutions
The solution is to approach the problem from the other direction: to satisfy the start criteria for Centrify, it is not necessary to make existing services depend on the new Centrify service, rather make the new Centrify service depend on existing services.
For example, an Upstart configuration file /etc/init/centrify.conf
could say:
start on (starting cron or starting autofs or starting nis)
Converting this into English, this would translate as:
start the Centrify service just before either cron, autofs or nis start (whichever starts first).
The order in which cron, autofs or nis start is irrelevant: Upstart will ensure that Centrify will start before whichever service starts first, thus ensuring that Centrify is running before any one of those services start.
Note too that Upstart will block the start of the first service that wants to start until Centrify has started running.
Very elegant and simple once you get used to thinking in this manner.
I believe you have 3 options.
You modify the existing configuration by adding "copytruncate"
/var/log/upstart/*.log { copytruncate daily missingok rotate 7 compress notifempty nocreate }
If you can't or (are not allowed) to change the existing logrotate config because of other log files that don't suffer and the existing config works for them, then move your "SERVICE_NAME.log" files to a new folder under /var/log if your wish, create a new config with the "copytruncate" and add it to the cron.daily.
a) If you're not allowed to change the host os logrotate config or add to the host OS's cron.daily, then your third option is to change the scripts or programs to either check that the file exists before writing out to the file. b) Another way is a bit of point 2 above which is to move your logfiles somewhere else and within you script or program, execute the logrotate command specific for that program's logfile.
Point 3b above is more tricky but more elegant and it is what I use most of the time as it means the program is self-sufficient and self-managed and doesn't need the OS's jobs to babysit it.
To find out how to manually run logrotate and add it to your program or script just type:
man logrotate
or
logrotate --help
If you are using Python for your programs you can check out how this program uses it to self-manage its log files. http://bazaar.launchpad.net/~ferncasado/keep.awake/trunk/files/head:/v4/
Best Answer
Upstart is the replacement for the traditional init.d style System-V bootup scripts. However, upstart is more than just a collection of bootup scripts. It allows in fact a minute planning and control of the start of different daemons. For instance, in order to automount network drives, you need first a working network. While before upstart these situations often led to race conditions, in the upstart declaration the prerequisite of a running network can be included.
Upstart is in fact based on an event monitoring system. When a certain hardware condition occurs, or another process sends an event, one or more of upstarts scripts might be triggered. This allows i.e. particular actions being automatically triggered when an usb stick is inserted or removed.
I believe all major Linux distributions are migrating System-V init to upstart step-by-step. In fact, upstarts can also trigger the start of the traditional init scripts, therefore, the transition does not have to occur all at once.