Opened 16 years ago

Last modified 10 years ago

#16969 new enhancement

Cacti: plist to use instead of cron

Reported by: wsiegrist@… Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc: nerdling (Jeremy Lavergne)
Port: cacti

Description

Cacti gives the user instructions for installation involving cron. It would be nice if it also offered a plist to use like:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
        <key>Label</key>
        <string>org.macports.cacti.poll</string>
        <key>ProgramArguments</key>
        <array>
                <string>/opt/local/bin/php</string>
                <string>/opt/local/share/cacti/poller.php</string>
        </array>
        <key>StartInterval</key>
        <integer>300</integer>
        <key>UserName</key>
        <string>_www</string>
</dict>
</plist>

Change History (7)

comment:1 Changed 16 years ago by markd@…

Good idea, but I wonder whether adding 'startupitem.user' and 'startupitem.interval' to base could be done? It seems like this functionality might be useful for other things too. But I'm not sure if daemondo would support 'StartInterval', so perhaps that would need to be modified as well, or perhaps another type of startupitem that does not use daemondo? I guess tracking a process isn't necessary for periodic process execution. What do you think?

comment:2 Changed 16 years ago by wsiegrist@…

Daemondo solves the problem of daemon processes not behaving correctly for launchd, but for periodic jobs I think you can skip daemondo completely. Adding the user and interval seems like a good idea. The startupitem generation could then make a daemondo or non-daemondo plist according to what options were provided. If startupitem.interval is provided (and non zero?) then you make something like I posted in the description, otherwise you make a daemondo-based plist.

comment:3 Changed 16 years ago by markd@…

Yeah, that's what I was thinking: a non-daemondo startupitem (when 'startupitem.interval' is used) that would default to user 'root' perhaps if no 'startupitem.user' is specified?

Also, would a 'startupitem.inetd' be a candidate for another non-daemondo startupitem for inetd emulation? I did a little hacking in base once before I realized that daemondo couldn't handle that and quit, without ever thinking of bypassing it altogether. Inetd emulation has been asked for and I'd like it too.

comment:4 Changed 16 years ago by nerdling (Jeremy Lavergne)

Cc: snc@… added

Cc Me!

comment:5 in reply to:  3 Changed 16 years ago by nerdling (Jeremy Lavergne)

Replying to markd@…:

Yeah, that's what I was thinking: a non-daemondo startupitem (when 'startupitem.interval' is used) that would default to user 'root' perhaps if no 'startupitem.user' is specified?

If no username is provided I'd suggest using the name of the port as a new user (to avoid running things that could be exploited).

comment:6 Changed 16 years ago by (none)

Milestone: Port Enhancements

Milestone Port Enhancements deleted

comment:7 Changed 10 years ago by mf2k (Frank Schima)

Owner: changed from markd@… to macports-tickets@…

markd has retired. See #44782.

Note: See TracTickets for help on using tickets.