a few small improvements

Signed-off-by: szaimen <szaimen@e.mail.de>
This commit is contained in:
szaimen 2022-04-06 21:00:20 +02:00
parent 94f0a799fc
commit c66b31901a
3 changed files with 6 additions and 7 deletions

View file

@ -1,9 +1,8 @@
#!/bin/bash
restart_process() {
set -x
echo "Restarting cron.sh because daily backup time was set or unset."
pkill cron.sh
set +x
}
file_present() {
@ -22,5 +21,5 @@ file_present() {
while true; do
file_present
sleep 5
sleep 2
done

View file

@ -1,7 +1,7 @@
#!/bin/bash
while true; do
while "$(find "/mnt/docker-aio-config/session/" -mindepth 1 -exec grep "aio_authenticated|[a-z]:1" {} \; | wc -l)" -gt 1; do
while [ "$(find "/mnt/docker-aio-config/session/" -mindepth 1 -exec grep "aio_authenticated|[a-z]:1" {} \; | wc -l)" -gt 1 ]; do
unset SESSION_FILES
SESSION_FILES="$(find "/mnt/docker-aio-config/session/" -mindepth 1)"
unset SESSION_FILES_ARRAY

View file

@ -118,7 +118,7 @@
<input type="hidden" name="{{csrf.keys.value}}" value="{{csrf.value}}">
<select id="selected_restore_time" name="selected_restore_time" form="restore_selection">
{% for restore_time in backup_times %}
<option value="{{ restore_time }}">{{ restore_time }}</option>
<option value="{{ restore_time }}">{{ restore_time }} CT</option>
{% endfor %}
</select>
<input class="button" type="submit" value="Restore selected backup"/>
@ -297,7 +297,7 @@
<span class="status error"></span> Last {{ borg_backup_mode }} failed! (<a href="/api/docker/logs?id=nextcloud-aio-borgbackup">Logs</a>)<br /><br />
{% elseif backup_exit_code == 0 %}
{% if borg_backup_mode == "backup" %}
<span class="status success"></span> Last {{ borg_backup_mode }} successful on {{ last_backup_time }}! (<a href="/api/docker/logs?id=nextcloud-aio-borgbackup">Logs</a>)<br /><br />
<span class="status success"></span> Last {{ borg_backup_mode }} successful on {{ last_backup_time }} CT! (<a href="/api/docker/logs?id=nextcloud-aio-borgbackup">Logs</a>)<br /><br />
{% else %}
<span class="status success"></span> Last {{ borg_backup_mode }} successful! (<a href="/api/docker/logs?id=nextcloud-aio-borgbackup">Logs</a>)<br /><br />
{% endif %}
@ -342,7 +342,7 @@
<input type="hidden" name="{{csrf.keys.value}}" value="{{csrf.value}}">
<select id="selected_restore_time" name="selected_restore_time" form="restore_selection">
{% for restore_time in backup_times %}
<option value="{{ restore_time }}">{{ restore_time }}</option>
<option value="{{ restore_time }}">{{ restore_time }} CT</option>
{% endfor %}
</select>
<input class="button" type="submit" value="Restore selected backup" onclick="return confirm('Restore the selected backup? Are you sure that you want to restore the selected backup? This will stop all running containers and restore the selected backup. It is recommended to create a backup first. You might also want to check the backup integrity.')" />