more changes to start/stop

This commit is contained in:
Michel Oosterhof 2017-03-07 19:17:30 +00:00
parent 8f34dd768f
commit 55105582cb
3 changed files with 8 additions and 6 deletions

View File

@ -148,20 +148,20 @@ $ sudo chown cowrie:cowrie /etc/authbind/byport/23
$ sudo chmod 770 /etc/authbind/byport/23
```
* Edit start.sh and modify the AUTHBIND_ENABLED setting
* Edit bin/cowrie and modify the AUTHBIND_ENABLED setting
* Change listen_port to 22 in cowrie.cfg
## Running using Supervisord
On Debian, put the below in /etc/supervisor/conf.d/cowrie.conf
```
[program:cowrie]
command=/home/cowrie/cowrie/start.sh cowrie-env
command=/home/cowrie/cowrie/bin/cowrie start
directory=/home/cowrie/cowrie/
user=cowrie
autorestart=true
redirect_stderr=true
```
Update the start.sh script, change:
Update the bin/cowrie script, change:
```
DAEMONIZE=""
```

View File

@ -1,5 +1,7 @@
#!/bin/bash
AUTHBIND_ENABLED=no
#Change the below to -n to disable daemonizing (for instance when using supervisor)
DAEMONIZE=""
################################################################################
## dont' modify below here ##

View File

@ -10,9 +10,9 @@ Type=forking
User=cowrie
Group=cowrie
PIDFile=/home/cowrie/cowrie/var/run/cowrie.pid
ExecStart=/home/cowrie/cowrie/start.sh cowrie-env
ExecStop=/home/cowrie/cowrie/stop.sh
ExecReload=/home/cowrie/cowrie/stop.sh && sleep 10 && /home/cowrie/cowrie/start.sh cowrie-env
ExecStart=/home/cowrie/cowrie/bin/cowrie start
ExecStop=/home/cowrie/cowrie/bin/cowrie stop
ExecReload=/home/cowrie/cowrie/bin/cowrie start && sleep 10 && /home/cowrie/cowrie/bin/cowrie stop
WorkingDirectory=/home/cowrie/cowrie/
Restart=on-failure
TimeoutSec=300