code: def service_pause(service_name, init_dir="/etc/init", initd_dir="/etc/init.d",
                    **kwargs):
      
      stopped = True
      if service_running(service_name, **kwargs):
          stopped = service_stop(service_name, **kwargs)
      upstart_file = os.path.join(init_dir, "{}.conf".format(service_name))
      sysv_file = os.path.join(initd_dir, service_name)
      if init_is_systemd():
          service('disable', service_name)
          service('mask', service_name)
      elif os.path.exists(upstart_file):
          override_path = os.path.join(
              init_dir, '{}.override'.format(service_name))
          with open(override_path, 'w') as fh:
              fh.write("manual\n")
      elif os.path.exists(sysv_file):
          subprocess.check_call(["update-rc.d", service_name, "disable"])
      else:
          raise ValueError(
              "Unable to detect {0} as SystemD, Upstart {1} or"
              " SysV {2}".format(
                  service_name, upstart_file, sysv_file))
      return stopped
docs: Pause a system service.
  
      Stop it, and prevent it from starting again at boot.
  
      :param service_name: the name of the service to pause
      :param init_dir: path to the upstart init directory
      :param initd_dir: path to the sysv init directory
      :param **kwargs: additional parameters to pass to the init system when
                       managing services. These will be passed as key=value
                       parameters to the init system's commandline. kwargs
                       are ignored for init systems which do not support
                       key=value arguments via the commandline.