MCPcopy Create free account
hub / github.com/baidu/openrasp / operateServer

Method operateServer

rasp-install/java/src/main/java/com/baidu/rasp/App.java:225–248  ·  view source on GitHub ↗
(String[] args)

Source from the content-addressed store, hash-verified

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:");

Callers 2

testMainMethod · 0.95
mainMethod · 0.95

Calls 10

showBannerMethod · 0.95
argsParserMethod · 0.95
checkArgsMethod · 0.95
newInstallerFactoryMethod · 0.95
installMethod · 0.95
newUninstallerFactoryMethod · 0.95
getUninstallerMethod · 0.95
uninstallMethod · 0.95
equalsMethod · 0.80
getInstallerMethod · 0.45

Tested by 1

testMainMethod · 0.76