Commit 1e9a8e2
committed
Fix proxy auto-restarting after intentional stop (#49)
When stopping via mtproxymax stop or TUI, the container would restart
because Docker's --restart=unless-stopped policy and the Telegram bot's
auto-recovery both tried to bring it back.
Fix:
- Set Docker restart policy to 'no' before stopping
- Create /tmp/.mtproxymax_stopped flag on intentional stop
- Bot health check and auto_recover() skip recovery if flag exists
- Flag is cleared on next mtproxymax start/restart1 parent 3d2dad0 commit 1e9a8e2
1 file changed
Lines changed: 9 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2734 | 2734 | | |
2735 | 2735 | | |
2736 | 2736 | | |
| 2737 | + | |
| 2738 | + | |
2737 | 2739 | | |
2738 | 2740 | | |
| 2741 | + | |
| 2742 | + | |
2739 | 2743 | | |
2740 | 2744 | | |
2741 | 2745 | | |
| |||
2778 | 2782 | | |
2779 | 2783 | | |
2780 | 2784 | | |
| 2785 | + | |
| 2786 | + | |
| 2787 | + | |
2781 | 2788 | | |
2782 | 2789 | | |
2783 | 2790 | | |
| |||
3226 | 3233 | | |
3227 | 3234 | | |
3228 | 3235 | | |
3229 | | - | |
| 3236 | + | |
3230 | 3237 | | |
3231 | 3238 | | |
3232 | 3239 | | |
| |||
4327 | 4334 | | |
4328 | 4335 | | |
4329 | 4336 | | |
4330 | | - | |
| 4337 | + | |
4331 | 4338 | | |
4332 | 4339 | | |
4333 | 4340 | | |
| |||
0 commit comments