mirror of https://github.com/cowrie/cowrie.git
add warning for py2.7 (#1348)
This commit is contained in:
parent
b8e0df92f6
commit
84e726895c
12
bin/cowrie
12
bin/cowrie
|
@ -24,6 +24,16 @@ first_time_use() {
|
|||
echo
|
||||
}
|
||||
|
||||
python_version_warning() {
|
||||
echo "version check"
|
||||
if python -V 2>&1 | grep -q '^Python 2.'; then
|
||||
echo
|
||||
echo "DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020."
|
||||
echo "Please upgrade your Python as Python 2.7 won't be maintained after that date. Cowrie has dropped support for Python 2.7."
|
||||
echo
|
||||
fi
|
||||
}
|
||||
|
||||
migrate_userdb() {
|
||||
if [ -f ${COWRIEDIR}/data/userdb.txt ]; then
|
||||
echo "Migrating ${COWRIEDIR}/data/userdb.txt to ${COWRIEDIR}/etc/userdb.txt"
|
||||
|
@ -100,6 +110,8 @@ cowrie_start() {
|
|||
echo 2>&1 "Not using Python virtual environment"
|
||||
fi
|
||||
|
||||
python_version_warning
|
||||
|
||||
# Automatically check if the authbind is enabled or not
|
||||
authfile="/etc/authbind/byport/22"
|
||||
if [ -z ${AUTHBIND_ENABLED} ] && [ -x "$authfile" ] && command -v authbind >/dev/null; then
|
||||
|
|
Loading…
Reference in New Issue