If your process does not do anything particularly exciting on startup/shutdown (well-defined launch command, nothing more exciting than killing it for shutdown), you can generally keep a single manifest around and edit to taste for various things you need to do. For NodeJS stuff I keep reusing this: http://timboudreau.com/files/omega.xml
Another option is to find an existing service whose startup sequence is very like what you're after, export that, e.g. svccfg export nginx > mymanifest.xml and then edit from there (the main issue is to make sure you *really* edit the name of the service, so you don't accidentally clobber something else). Googling and man pages usually are good enough to answer any questions about the format. -Tim On Wed, Feb 18, 2015 at 5:36 AM, Matthew Law via smartos-discuss < [email protected]> wrote: > I hope this is not O/T... > > We have a zone which runs a small Ruby web app. This is fronted by nginx > and runs the unicorn app server and Resque message queue. The app can be > started by running "bundle exec unicorn -c > /home/appuser/current/config/unicorn.rb > -E production -D" and the queue workers with: "bundle exec rake > resque:work" (both of these are commands are issued as the appuser user > from the /home/appuser/current dir, and so inherit their path etc). > > This all works fine when run manually either logged into the zone as the > app user or remotely over ssh with something like capistrano. I would like > to create an SMF manifest to do the same if the zone is restarted but I am > not sure how to go about doing that because of the PATH requirements and > the bundler abstraction. > > On the equivalent Linux environment we would normally use something like > monit to do this but I couldn't find monit in the packages on SmartOS. I > tried compiling it from source but it won't run and I suspect SMF is the > best solution in SmartOS? Any help would be appreciated. > > Thanks in advance, > > Matt. > > > ------------------------------------------- > smartos-discuss > Archives: https://www.listbox.com/member/archive/184463/=now > RSS Feed: https://www.listbox.com/member/archive/rss/184463/ > 24549504-c4bff9d3 > Modify Your Subscription: https://www.listbox.com/ > member/?& > Powered by Listbox: http://www.listbox.com > -- http://timboudreau.com ------------------------------------------- smartos-discuss Archives: https://www.listbox.com/member/archive/184463/=now RSS Feed: https://www.listbox.com/member/archive/rss/184463/25769125-55cfbc00 Modify Your Subscription: https://www.listbox.com/member/?member_id=25769125&id_secret=25769125-7688e9fb Powered by Listbox: http://www.listbox.com
