| 223 | } |
| 224 | |
| 225 | public static void operateServer(String[] args) throws RaspError, ParseException, IOException { |
| 226 | showBanner(); |
| 227 | argsParser(args); |
| 228 | checkArgs(); |
| 229 | if ("install".equals(install)) { |
| 230 | File serverRoot = new File(baseDir); |
| 231 | InstallerFactory factory = newInstallerFactory(); |
| 232 | Installer installer = factory.getInstaller(serverRoot, noDetect); |
| 233 | if (installer != null) { |
| 234 | installer.install(); |
| 235 | } else { |
| 236 | throw new RaspError(E10007); |
| 237 | } |
| 238 | } else if ("uninstall".equals(install)) { |
| 239 | File serverRoot = new File(baseDir); |
| 240 | UninstallerFactory factory = newUninstallerFactory(); |
| 241 | Uninstaller uninstaller = factory.getUninstaller(serverRoot); |
| 242 | if (uninstaller != null) { |
| 243 | uninstaller.uninstall(); |
| 244 | } else { |
| 245 | throw new RaspError(E10007); |
| 246 | } |
| 247 | } |
| 248 | } |
| 249 | |
| 250 | public static void listServerSupport(String serverRoot) throws RaspError { |
| 251 | System.out.println("List of currently supported servers are:"); |