# Restart Nginx

> >-

- **Type:** Skill
- **Install:** `agentstack add skill-knoxops-agent-runbook-restart-nginx`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [KnoxOps](https://agentstack.voostack.com/s/knoxops)
- **Installs:** 0
- **Category:** [Agent Skills](https://agentstack.voostack.com/c/agent-skills)
- **Latest version:** 0.1.0
- **License:** Apache-2.0
- **Upstream author:** [KnoxOps](https://github.com/KnoxOps)
- **Source:** https://github.com/KnoxOps/agent-runbook/tree/master/examples/restart-nginx

## Install

```sh
agentstack add skill-knoxops-agent-runbook-restart-nginx
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

## Input Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| host | string | Yes | Target server hostname or IP |

## Execution Flow

### Task Context

Before starting execution, initialize `task_context.json`:

```json
{
  "task_id": "",
  "current_step": 0,
  "current_step_id": null,
  "status": "running",
  "steps": {
    "restart": "pending",
    "verify": "pending"
  },
  "updated_at": ""
}
```

Update this file after each step completes. On error, set step status to `"failed"` and overall `status` to `"failed"`.

### Step 1: restart

**Type:** agent
**Description:** SSH in and restart Nginx

## Execution
Launch an independent agent with the following prompt file:

**Dispatch instruction:**

SSH into {host} and run systemctl restart nginx

**Agent workflow:**

1. Prepare the execution environment

2. Execute the agent with the prompt

3. Write results to:
   - File: `restart_result.json`

## Output
- **Schema:** schemas/restart.schema.json
  - **File:** restart_result.json

### Progress Tracking

After completing this step, update `task_context.json`:
- Set `current_step_id` to `"restart"`
- Set `steps.restart` to `"completed"`
### Step 2: verify

**Type:** agent
**Description:** Verify Nginx is healthy

## Input Files
- `restart_result.json` (from Step restart, schema: schemas/restart.schema.json)

## Execution
Launch an independent agent with the following prompt file:

**Dispatch instruction:**

curl http://{host}/health and check the status code

**Agent workflow:**

1. Read input data from:
   - Schema: `schemas/restart.schema.json`

2. Execute the agent with the prompt

3. Write results to:
   - File: `verify_result.json`

## Output
- **Schema:** schemas/verify.schema.json
  - **File:** verify_result.json

### Progress Tracking

After completing this step, update `task_context.json`:
- Set `current_step_id` to `"verify"`
- Set `steps.verify` to `"completed"`

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [KnoxOps](https://github.com/KnoxOps)
- **Source:** [KnoxOps/agent-runbook](https://github.com/KnoxOps/agent-runbook)
- **License:** Apache-2.0

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** yes
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-knoxops-agent-runbook-restart-nginx
- Seller: https://agentstack.voostack.com/s/knoxops
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
