       switch type
         when "shell"
           unless content.script?
-          then err = "Type 'shell' requires a 'script'"
-          else content = { script: content.script }
+            err = "Type 'shell' requires a 'script'"
+          else
+
+            contentSum = crypto.createHash 'sha1'
+              .update "#{content.script}"
+              .digest 'hex'
+
+            content = { script: content.script }
+
         else
           err = "Type is not supported for now."
 
     err = new KodingError err  if err?
-    return [err, content]
+    return [err, content, contentSum]
 
 
   checkData = (delegate, data, callback)->
 
     {type, content, slug, label} = data
 
-    [err, content] = checkContent type, content
+    [err, content, contentSum] = checkContent type, content
     if err? then return callback err
 
     slug ?= (require 'hat') 32

JUser       = require '../user'
JGroup      = require '../group'
JCredential = require './credential'

module.exports = class JProvisioner extends jraphical.Module


  @getName = -> 'JProvisioner'

  checkContent = (type, content)->

    contentSum = "%SUM%"

    if not type?
      err = "Type missing."
