Start Bluetooth device scan
()
| 12608 | }), 400 |
| 12609 | |
| 12610 | logger.info(f"Pwn manual update requested at {repo_path}") |
| 12611 | update_result = _execute_pwn_git_update(repo_path) |
| 12612 | |
| 12613 | if not update_result['success']: |
| 12614 | return jsonify({ |
| 12615 | 'success': False, |
| 12616 | 'error': update_result['error'] or 'Unknown error during git pull', |
| 12617 | 'warnings': update_result['warnings'], |
| 12618 | 'suggestion': 'Check repository status; SSH in if persistent.' |
| 12619 | }), 500 |
| 12620 | |
| 12621 | return jsonify({ |
| 12622 | 'success': True, |
| 12623 | 'message': 'Pwnagotchi update completed successfully', |
| 12624 | 'output': update_result['output'], |
| 12625 | 'warnings': update_result['warnings'] |
| 12626 | }) |
| 12627 | |
| 12628 | @app.route('/api/pwn/stash-update', methods=['POST']) |
| 12629 | def pwn_stash_and_update(): |
| 12630 | """Stash, pull, drop stash (or preserve on failure). Mirrors stash_and_update |
| 12631 | but operates on /opt/pwnagotchi via sudo.""" |
| 12632 | repo_path = PWN_REPO_PATH |
| 12633 |
nothing calls this directly
no test coverage detected