You can most likely use an exec with an 'onlyif' parameter with netstat or lsof. But like other people are posting, probably better off as a service. Let me know if you figure out the exact exec onlyif command you used, would be good to know.
exec { "run_account_purger": command => "/usr/local/sbin/account_purger", onlyif => "grep -c old_account /etc/passwd", } On Wednesday, August 28, 2013 11:05:07 AM UTC-4, Virtual_user wrote: > > Hi, > basically i have script and when i run the script its open a port and > listen on that port. > > I know i can use augeas to add entry into /etc/services but i am not using > xiented . > > is there any way to to find out if the port is running or not (10049) > and if the port is not running then force the script to run ?? > > Thanks > Kind Regards > > > -- _____________________________________________________ This email and any files transmitted with it are confidential and intended solely for the addressee. If you received this email in error, please do not disclose the contents to anyone; kindly notify the sender by return email and delete this email and any attachments from your system. © 2011 Currensee Inc. is a member of the National Futures Association (NFA) Member ID 0403251 | Over the counter retail foreign currency (Forex) trading may involve significant risk of loss. It is not suitable for all investors and you should make sure you understand the risks involved before trading and seek independent advice if necessary. Performance, strategies and charts shown are not necessarily predictive of any particular result and past performance is no indication of future results. Investor returns may vary from Trade Leader returns based on slippage, fees, broker spreads, volatility or other market conditions. Currensee Inc | 54 Canal St 4th Floor | Boston, MA 02114 | +1.617.624.3824 -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.