Added Command Line Script Support to Stunt

2 views
Skip to first unread message

Todd Sundsted

unread,
May 12, 2013, 6:00:30 PM5/12/13
to MOO Talk
The last few GitHub (https://github.com/toddsundsted/stunt) commits
add support for specifying a boot script (or a file containing a boot
script) on the command line when starting the Stunt server. I added
this to support my Heroku-ified version of Stunt, and to make
stripping down a database into a barebones Stunt core easier.

I also updated Minimal.db and the associated README to support this
new functionality, since it makes the process of bootstrapping a new
database quite a bit easier than it has been in the past.

I actually updated the Programmers Manual, this time, as well. If you
want to use this functionality, you will have to add a `
$do_start_script()' verb to your database. An adequate implementation
of this verb would be:

return eval(@args);

Todd

Seth I. Rich

unread,
May 13, 2013, 4:56:24 AM5/13/13
to Todd Sundsted, moo-talk

Is this a wizardly "return eval(@args);" without any permissions check?

--
You received this message because you are subscribed to the Google Groups "MOO Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to MOO-talk+u...@googlegroups.com.
To post to this group, send email to MOO-...@googlegroups.com.
Visit this group at http://groups.google.com/group/MOO-talk?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Michael Munson

unread,
May 13, 2013, 6:20:50 AM5/13/13
to Todd Sundsted, MOO Talk
Isn't there already a $server_started() verb?

Sent from my iPad

Seth I. Rich

unread,
May 13, 2013, 8:33:43 AM5/13/13
to Michael Munson, Todd Sundsted, MOO Talk
$server_started would be convenient if the script were already wired up within the MOO.  What's mentioned here is a startup piece of code, which I can see as a good thing.  I just question the specific recommended implementation.

Seth
--
Seth I. Rich - se...@briar.com
Rabbits on walls, no problem.

Todd Sundsted

unread,
May 13, 2013, 9:01:41 AM5/13/13
to Seth I. Rich, Michael Munson, MOO Talk
Seth, that was a good catch.  Yes, definitely any useful implementation of this verb is going to need security.  I will update the relevant docs.  I recommend at least:

  callers() && raise(E_PERM);
  return eval(@args);

Todd



Todd Sundsted

unread,
May 13, 2013, 2:33:04 PM5/13/13
to MOO Talk
A slightly more readable write-up:

https://stunt.io/io/start-scripts

Todd
Reply all
Reply to author
Forward
0 new messages