Open huytn opened 8 years ago
Try to set a proper PYTHONPATH
environment variable should works.
@imZack how to do it? help please!
@FRANZEE I have created a pull request to specify module path in mosquitto config instead of using PYTHONPATH https://github.com/mbachry/mosquitto_pyauth/pull/8
Hi, I have the same problem and don't know how to set PYTHONPATH that it will work. Any help would be great!
PYTHONPATH is an environment variable. Have a look at https://docs.python.org/2/using/cmdline.html#envvar-PYTHONPATH
export PYTHONPATH=/path/to/module
mosquitto -c your_config_file.conf
or when using bash this will also work:
PYTHONPATH=/path/to/module mosquitto -c your_config_file.conf
in mosquitto.conf make:
auth_plugin /usr/local/lib/mosquitto/auth_plugin_pyauth.so auth_opt_pyauth_module mosquitto_auth
EXPORT pythonpath:
export PYTHONPATH=/usr/lib/mosquitto
and run
mosquitto -c /etc/mosquitto/mosquitto.conf
1561325989: mosquitto version 1.6.3 starting 1561325989: Config loaded from /etc/mosquitto/mosquitto.conf. 1561325989: Loading plugin: /usr/local/lib/mosquitto/auth_plugin_pyauth.so 1561325989: ├── Username/password checking enabled. 1561325989: ├── TLS-PSK checking enabled. 1561325989: └── Extended authentication not enabled. 1561325989: Opening ipv4 listen socket on port 8883. 1561325989: Opening ipv6 listen socket on port 8883.
how to install this module