hunk.code_window: 		} else {
   			log.Println("Instance already has defined endpoints. Skipping the endpoint defined via CLI.")
   		}
   	}
   	var server portainer.Server = &http.Server{
   		BindAddress:            *flags.Addr,
   		AssetsPath:             *flags.Assets,
  
hunk.labels: keep keep keep keep add keep keep keep
hunk.after_edit: 	if *flags.AdminPassword != "" {
   		log.Printf("Creating admin user with password hash %s", *flags.AdminPassword)
   		user := &portainer.User{
   			Username: "admin",
   			Role:     portainer.AdministratorRole,
   			Password: *flags.AdminPassword,
   		}
   		err := store.UserService.CreateUser(user)
   		if err != nil {
   			log.Fatal(err)
   		}
   	}
  
hunk.file_path: api/cmd/portainer/main.go
hunk.type: add
file: angular.module('portainer.services')
  .factory('ModalService', [function ModalServiceFactory() {
    'use strict';
    var service = {};
  
    service.confirm = function(options){
      var box = bootbox.confirm({
        title: options.title,
        message: options.message,
        buttons: {
          confirm: {
            label: options.buttons.confirm.label,
            className: options.buttons.confirm.className
          },
          cancel: {
            label: options.buttons.cancel && options.buttons.cancel.label ? options.buttons.cancel.label : 'Cancel'
          }
        },
        callback: options.callback
      });
      box.css({
        'top': '50%',
        'margin-top': function () {
          return -(box.height() / 2);
        }
      });
    };
  
    service.confirmOwnershipChange = function(callback, msg) {
      service.confirm({
        title: 'Are you sure ?',
        message: msg,
        buttons: {
          confirm: {
            label: 'Change ownership',
            className: 'btn-primary'
          }
        },
        callback: callback,
      });
    };
  
    service.confirmContainerOwnershipChange = function(callback) {
      var msg = 'You can change the ownership of a container one way only. You will not be able to make this container private again. <b>Changing ownership on this container will also change the ownership on any attached volume.</b>';
      service.confirmOwnershipChange(callback, msg);
    };
  
    service.confirmServiceOwnershipChange = function(callback) {
      var msg = 'You can change the ownership of a service one way only. You will not be able to make this service private again. <b>Changing ownership on this service will also change the ownership on any attached volume.</b>';
      service.confirmOwnershipChange(callback, msg);
    };
  
    service.confirmVolumeOwnershipChange = function(callback) {
      var msg = 'You can change the ownership of a volume one way only. You will not be able to make this volume private again.';
      service.confirmOwnershipChange(callback, msg);
    };
  
    service.confirmImageForceRemoval = function(callback) {
      service.confirm({
        title: "Are you sure?",
        message: "Forcing the removal of the image will remove the image even if it has multiple tags or if it is used by stopped containers.",
        buttons: {
          confirm: {
            label: 'Remove the image',
            className: 'btn-danger'
          }
        },
        callback: callback,
      });
    };
  
    service.confirmDeletion = function(message, callback) {
      service.confirm({
        title: 'Are you sure ?',
        message: message,
        buttons: {
          confirm: {
            label: 'Delete',
            className: 'btn-danger'
          }
        },
        callback: callback,
      });
    };
    return service;
  }]);
  