mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-06-17 11:10:23 +00:00
- Instead of running the command using sudo. If the server is not reachable, run the privileged command using sudo. Tests: - Typical privileged calls are made to server as evidenced by the network emoji icon in the log. - Some actions such as creating gitweb repository or downloading a backup archive happen via sudo instead of privileged daemon. - When a call is made to privileged daemon the log message is show just like a sudo call. - If the daemon is not running and can't be started, the calls are made to sudo. - If the daemon is rejects connections, then calls are automatically made to sudo. - When cloning a gitweb repository, the operation is immediately returned and task runs in background. Other tasks as waited upon until they are finished. Introducing a sleep in privileged method leads to increased page load time. - When server sends non-JSON response, a decode error is printed and exception is raised. - When a typical privileged call is made, the return value as expected. - When a typical privileged call raises exception, a nice HTML exception is shown in the UI. stdout/stderr outputs are not shown. Error is also logged on the console as expected but without stdout/stderr. Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org> Reviewed-by: Joseph Nuthalapati <njoseph@riseup.net>