code: func (uw *UnitWriter) AppReaperUnit(appName types.ACName, binPath string, opts ...*unit.UnitOption) {
  	if uw.err != nil {
  		return
  	}
  
  	opts = append(opts, []*unit.UnitOption{
  		unit.NewUnitOption("Unit", "Description", fmt.Sprintf("%s Reaper", appName)),
  		unit.NewUnitOption("Unit", "DefaultDependencies", "false"),
  		unit.NewUnitOption("Unit", "StopWhenUnneeded", "yes"),
  		unit.NewUnitOption("Unit", "Before", "halt.target"),
  		unit.NewUnitOption("Unit", "Conflicts", "exit.target"),
  		unit.NewUnitOption("Unit", "Conflicts", "halt.target"),
  		unit.NewUnitOption("Unit", "Conflicts", "poweroff.target"),
  		unit.NewUnitOption("Service", "RemainAfterExit", "yes"),
  		unit.NewUnitOption("Service", "ExecStop", fmt.Sprintf(
  			"/reaper.sh \"%s\" \"%s\" \"%s\"",
  			appName,
  			common.RelAppRootfsPath(appName),
  			binPath,
  		)),
  	}...)
  
  	uw.WriteUnit(
  		ServiceUnitPath(uw.p.Root, types.ACName(fmt.Sprintf("reaper-%s", appName))),
  		fmt.Sprintf("failed to write app %q reaper service", appName),
  		opts...,
  	)
  }
docs: // AppReaperUnit writes an app reaper service unit for the given app in the given path using the given unit options.