Integrates the Common Reusable SHell (CRaSH - http://crashub.org/ ) into Grails.
grails install-plugin crash
A plugin for grails to include the Common Reusable SHell - CRaSH
InstallationJust install the plugin with e.g.
grails install-plugin crashto embed CRaSH into your grails application. It includes the ssh shell and by default listens on port 2000 with the username/password 'admin'. So make sure to change that for production! For general documentation on CRaSH visit the CRaSH project website.
ConfigurationTo start up CRaSH, a spring bean named
SpringWebBootstrapis defined. Its config properties can be set by assigning a map of config properties to 'plugin.crash.config', e.g.:
To include telnet support include the following dependency in your own BuildConfig:
plugin.crash.config = [ 'crash.ssh.port': 2001, 'crash.auth.simple.password': 'secretPassword' ]
Grails specific usageThere is an
evaluatecommand available which takes a
Stringas argument which is evaluated as a groovy script. This script has the GrailsApplication instance available as
grailsApplicationfrom which pretty much everything grails related should be accessible.