Skip to content

Conversation

@dvershinin
Copy link

Adds SIGHUP handler for on the fly config reload. Fixes #46.

To check, kill -s HUP <mtproxy-pid>.

Result:

[24061][2019-06-28 04:04:51.292265 local] configuration file /usr/share/mtproxy/proxy-multi.conf re-read successfully (68 bytes parsed), new configuration active
[24061][2019-06-28 04:04:51.292270 local] Creating NEW connection to x.x.x.x:8888

Then in e.g. SystemD service, add:

[Service]
...
ExecReload=/bin/kill -s HUP $MAINPID

Result is being able to reload config after updating proxy file via systemctl reload mtproxy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

On-the-fly config file reload

1 participant