diff --git a/INSTALL.md b/INSTALL.md index ed87deda..5c4e6155 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -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="" ``` diff --git a/bin/cowrie b/bin/cowrie index 1aaaafd2..c07e0a22 100755 --- a/bin/cowrie +++ b/bin/cowrie @@ -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 ## diff --git a/doc/systemd/cowrie.service b/doc/systemd/cowrie.service index df35af34..f958f14a 100644 --- a/doc/systemd/cowrie.service +++ b/doc/systemd/cowrie.service @@ -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