# Running init.d script on Gentoo produces "daemon: command not found”

**URL:** <https://discuss.elastic.co/t/running-init-d-script-on-gentoo-produces-daemon-command-not-found/98938>\
**Category:** Beats\
**Tags:** packetbeat\
**Created:** [August 31, 2017, 5:34am UTC](https://discuss.elastic.co/t/running-init-d-script-on-gentoo-produces-daemon-command-not-found/98938 "2017-08-31T05:34:29Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![stefansaye](https://avatars.discourse-cdn.com/v4/letter/s/df788c/32.png) [@stefansaye](https://discuss.elastic.co/u/stefansaye)\
**Post date:** [August 31, 2017, 5:34am UTC](https://discuss.elastic.co/t/running-init-d-script-on-gentoo-produces-daemon-command-not-found/98938/1 "2017-08-31T05:34:29Z")

</div>

Hi

Hi! Can u help me pls? Why is it not starting? packetbeat is running with same configuration.

```
govind :~ # /etc/init.d/packetbeat start

Starting packetbeat: 2017/08/31 05:21:07.173725 beat.go:285: INFO Home path: [/usr/share /packetbeat] Config path: [/etc/packetbeat] Data path: [/var/lib/packetbeat] Logs path: [/var/log/packetbeat]
2017/08/31 05:21:07.173746 beat.go:186: INFO Setup Beat: packetbeat; Version: 5.5.2
2017/08/31 05:21:07.173871 metrics.go:23: INFO Metrics logging every 30s
2017/08/31 05:21:07.173941 output.go:258: INFO Loading template enabled. Reading template file: /etc/packetbeat/packetbeat.template.json
2017/08/31 05:21:07.174910 output.go:269: INFO Loading template enabled for Elasticsearch 2.x. Reading template file: /etc/packetbeat/packetbeat.template-es2x.json
2017/08/31 05:21:07.175887 output.go:281: INFO Loading template enabled for Elasticsearch 6.x. Reading template file: /etc/packetbeat/packetbeat.template-es6x.json
2017/08/31 05:21:07.176777 client.go:128: INFO Elasticsearch url: http://192.168.3.122:9201
2017/08/31 05:21:07.176796 client.go:128: INFO Elasticsearch url: http://192.168.3.122:9202
2017/08/31 05:21:07.176804 client.go:128: INFO Elasticsearch url: http://192.168.3.122:9203
2017/08/31 05:21:07.176824 client.go:128: INFO Elasticsearch url: http://192.168.3.122:9204
2017/08/31 05:21:07.176833 client.go:128: INFO Elasticsearch url: http://192.168.3.122:9206
2017/08/31 05:21:07.177146 outputs.go:108: INFO Activated elasticsearch as output plugin.
2017/08/31 05:21:07.177255 publish.go:295: INFO Publisher name: packetbeat
2017/08/31 05:21:07.177465 async.go:63: INFO Flush Interval set to: 1s
2017/08/31 05:21:07.177473 async.go:64: INFO Max Bulk Size set to: 50
2017/08/31 05:21:07.177577 procs.go:79: INFO Process matching disabled
2017/08/31 05:21:07.177718 protos.go:89: INFO registered protocol plugin: mysql
2017/08/31 05:21:07.177725 protos.go:89: INFO registered protocol plugin: nfs
2017/08/31 05:21:07.177730 protos.go:89: INFO registered protocol plugin: dns
2017/08/31 05:21:07.177747 protos.go:89: INFO registered protocol plugin: http
2017/08/31 05:21:07.177751 protos.go:89: INFO registered protocol plugin: memcache
2017/08/31 05:21:07.177756 protos.go:89: INFO registered protocol plugin: pgsql
2017/08/31 05:21:07.177760 protos.go:89: INFO registered protocol plugin: redis
2017/08/31 05:21:07.177765 protos.go:89: INFO registered protocol plugin: thrift
2017/08/31 05:21:07.177770 protos.go:89: INFO registered protocol plugin: amqp
2017/08/31 05:21:07.177803 protos.go:89: INFO registered protocol plugin: cassandra
2017/08/31 05:21:07.177807 protos.go:89: INFO registered protocol plugin: mongodb
Config OK
/etc/init.d/packetbeat: line 55: daemon: command not found

```

my System specification

```
govind ~/packetbeat-5.5.2-darwin-x86_64 # uname -m
x86_64

govind ~/packetbeat-5.5.2-darwin-x86_64 # cat /etc/gentoo-release
Gentoo Base System release 2.3

govind ~/packetbeat-5.5.2-darwin-x86_64 # uname -r
4.12.5-gentoo-v1

```

Please help  
Thanks

---

<div class="post-metadata">

**Author:** ![andrewkroh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/andrewkroh/32/3784_2.png) [@andrewkroh](https://discuss.elastic.co/u/andrewkroh)\
**Post date:** [September 1, 2017, 8:26pm UTC](https://discuss.elastic.co/t/running-init-d-script-on-gentoo-produces-daemon-command-not-found/98938/2 "2017-09-01T20:26:04Z")

</div>

> [@stefansaye](#):
>
> daemon: command not found

`daemon` is a function found on RHEL based systems in ` /etc/rc.d/init.d/functions`. We don't test on Gentoo, but it would be nice to have our scripts work there. Sounds like some changes will be needed to get it working there.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [September 30, 2017, 1:16pm UTC](https://discuss.elastic.co/t/running-init-d-script-on-gentoo-produces-daemon-command-not-found/98938/4 "2017-09-30T13:16:48Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
