treasure-data/td-agent — pull request #35 by kenjiskywalker (2013-08-02 09:11:35+00:00)
Title: add configtest td-agent.init

Hi,

I commited configtest at redhat initscript.
Please check it.

- reference : [Red Hat Nginx Init Script - nginx](http://wiki.nginx.org/RedHatNginxInitScript)

---

```
# /etc/init.d/td-agent
Usage: td-agent {start|stop|reload|restart|condrestart|status|configtest}
#
```

- td-agent.conf

```

type forward
port 24224

type file
path /tmp/td-agent-unmatch

```

### start

```
# /etc/init.d/td-agent start
Starting td-agent: [ OK ]
#
```

### reload

```
# /etc/init.d/td-agent reload
Reloading td-agent: [ OK ]
#
```

### restart

```
# /etc/init.d/td-agent restart
Shutting down td-agent: [ OK ]
Starting td-agent: [ OK ]
#
```

---

chage td-agent.conf

```

type forward
port 24224

type file
path /tmp/td-agent-unmatch
# typo
```

### reload

Fail before it is reloaded.

```
# /etc/init.d/td-agent status
td-agent (pid 2495) is running...
#
# /etc/init.d/td-agent reload
2013-08-02 17:55:43 +0900 [error]: Dry run failed: parse error at td-agent.conf line 9
#
# /etc/init.d/td-agent status
td-agent (pid 2495) is running...
#
```

### restart

Fail before it is restarted.

```
# /etc/init.d/td-agent status
td-agent (pid 2495) is running...
#
# /etc/init.d/td-agent restart
2013-08-02 17:56:27 +0900 [error]: Dry run failed: parse error at td-agent.conf line 9
#
# /etc/init.d/td-agent status
td-agent (pid 2495) is running...
#
```