mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-02-04 08:13:38 +00:00
- Closes #366 and closes #304 (all sub-tasks). - Start new process group with setsid() by sending start_new_session=True - Detach from parent process fds by closing all FDs and attaching stdin, stdou and stderr to /dev/null. - Don't wait for the process to complete. - This allows for upgrading Plinth while upgrades are trigged from Plinth itself. - Show log of upgrade exection instead of output and error log of the process which can no longer be collected. This has the advantage of showing automatic executions also. - Rewrite the mechanism to detect whether upgrades can be run. It is now based on whether the package manager is busy. This has the advantage of working properly if other apt processes are running, automatic upgrades are running, etc. - Busy status works even if Plinth is restarted while upgrades are in progress. - More descriptive messages showing that upgrades don't have to be triggered manually. - Warn that other packages can't be installed while upgrades are running, which may take a long time. - Warn the users of potential temporary unavailability of Plinth/Apache2.
86 lines
2.3 KiB
HTML
86 lines
2.3 KiB
HTML
{% extends 'base.html' %}
|
|
{% comment %}
|
|
#
|
|
# This file is part of Plinth.
|
|
#
|
|
# This program is free software: you can redistribute it and/or modify
|
|
# it under the terms of the GNU Affero General Public License as
|
|
# published by the Free Software Foundation, either version 3 of the
|
|
# License, or (at your option) any later version.
|
|
#
|
|
# This program is distributed in the hope that it will be useful,
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
# GNU Affero General Public License for more details.
|
|
#
|
|
# You should have received a copy of the GNU Affero General Public License
|
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
#
|
|
{% endcomment %}
|
|
|
|
{% load i18n %}
|
|
|
|
{% block page_head %}
|
|
|
|
{% if is_busy %}
|
|
<meta http-equiv="refresh" content="3"/>
|
|
{% endif %}
|
|
|
|
{% endblock %}
|
|
|
|
|
|
{% block content %}
|
|
|
|
<h2>{{ title }}</h2>
|
|
|
|
<p>
|
|
{% blocktrans trimmed %}
|
|
Upgrades install the latest software and security updates. When automatic
|
|
upgrades are enabled, upgrades are automatically run every night. You
|
|
don't normally need to start the upgrade process.
|
|
{% endblocktrans %}
|
|
</p>
|
|
|
|
<p>
|
|
{% blocktrans trimmed %}
|
|
Depending on the number of packages to install, this may take a long time
|
|
to complete. While upgrades are in progress, you will not be able to
|
|
install other packages. During the upgrade, this web interface may be
|
|
temporarily unavailable and show an error. Refresh the page to continue.
|
|
{% endblocktrans %}
|
|
</p>
|
|
|
|
{% if not is_busy %}
|
|
<form class="form" method="post" action="{% url 'upgrades:upgrade' %}">
|
|
{% csrf_token %}
|
|
|
|
<input type="submit" class="btn btn-primary"
|
|
value="{% trans "Upgrade now »" %}"/>
|
|
</form>
|
|
{% endif %}
|
|
|
|
{% if is_busy %}
|
|
<p class="running-status-parent">
|
|
<span class="running-status active"></span>
|
|
{% trans "A package manager is running." %}
|
|
</p>
|
|
{% endif %}
|
|
|
|
{% if log %}
|
|
<h5>{% trans "Recent log from upgrades:" %}</h5>
|
|
|
|
<pre>{{ log }}</pre>
|
|
{% endif %}
|
|
|
|
{% endblock %}
|
|
|
|
{% block page_js %}
|
|
<script>
|
|
$('.show-details').show();
|
|
$('.details').hide();
|
|
$('.show-details').click(function() {
|
|
$('.details').toggle("slow");
|
|
});
|
|
</script>
|
|
{% endblock %}
|