code: public void exit() {
  
          if (m_exitCalled) {
              return;
          }
          m_exitCalled = true;
          try {
              if (m_additionalShellCommands != null) {
                  m_additionalShellCommands.shellExit();
              } else if (null != m_shellCommands) {
                  m_shellCommands.shellExit();
              }
          } catch (Throwable t) {
              t.printStackTrace();
          }
          if (m_opencms != null) {
              // if called by an in line script we don't want to kill the whole instance
              try {
                  m_opencms.shutDown();
              } catch (Throwable t) {
                  t.printStackTrace();
              }
          }
      }
docs: Exits this shell and destroys the OpenCms instance.<p>