Package org.platformlayer.ops

Examples of org.platformlayer.ops.OpsTarget.rm()


      target.executeCommand(Command.build("extlinux --install  {0}", rootfsDir).setTimeout(TimeSpan.FIVE_MINUTES));
    }

    if (supportCloudConfigDisk) {
      if (useConfigDriveSymlinks) {
        target.rm(new File(rootfsDir, "etc/network/interfaces"));
        target.executeCommand("ln -s /media/config/etc/network/interfaces {0}", new File(rootfsDir,
            "etc/network/interfaces"));

        target.mkdir(new File(rootfsDir, "root/.ssh"));
        target.executeCommand("ln -s /media/config/root/.ssh/authorized_keys {0}", new File(rootfsDir,
View Full Code Here


    }

    {
      // Remove policy file
      File policyFile = new File(rootfsDir, "usr/sbin/policy-rc.d");
      target.rm(policyFile);
    }

    target.executeCommand("sync");
    target.executeCommand("umount {0}", new File(rootfsDir, "proc"));
View Full Code Here

public class ApacheBootstrap extends OpsTreeBase {
  @Handler
  public void handler() throws OpsException {
    OpsTarget target = OpsContext.get().getInstance(OpsTarget.class);

    target.rm(new File("/etc/apache2/sites-enabled/000-default"));
  }

  public static ApacheBootstrap build() {
    ApacheBootstrap apacheModule = Injection.getInstance(ApacheBootstrap.class);
    return apacheModule;
View Full Code Here

  @Handler
  public void handler() throws OpsException {
    OpsTarget target = OpsContext.get().getInstance(OpsTarget.class);

    target.rm(new File("/etc/nginx/sites-enabled/default"));
  }

  public static NginxServerBootstrap build() {
    return Injection.getInstance(NginxServerBootstrap.class);
  }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.