Initial import of borg-restore

This commit is contained in:
Marek Miklewicz
2026-07-04 11:20:44 +02:00
commit bd66a92f30
24 changed files with 11365 additions and 0 deletions
+1
View File
@@ -0,0 +1 @@
<a href="/CMD_PLUGINS_ADMIN/borg-restore/index.html" target="_top"><img src="/CMD_PLUGINS_ADMIN/borg-restore/images/admin_icon.svg">BorgBackup - Przywracanie plików (Admin)<br></a>
+1
View File
@@ -0,0 +1 @@
<a href="/CMD_PLUGINS_ADMIN/borg-restore/index.html" target="_top">BorgBackup - Przywracanie plików (Admin)</a>
+27
View File
@@ -0,0 +1,27 @@
#!/bin/sh
user="${USERNAME:-${LOGNAME:-${USER:-}}}"
lang="${LANGUAGE:-}"
normalize_lang() {
val="$(printf '%s' "$1" | tr '[:upper:]' '[:lower:]' | tr -d '[:space:]')"
case "$val" in
pl*|polish*) echo "pl" ;;
en*|english*) echo "en" ;;
*) echo "" ;;
esac
}
lang="$(normalize_lang "$lang")"
if [ -z "$lang" ] && [ -n "$user" ] && [ -r "/usr/local/directadmin/data/users/$user/user.conf" ]; then
cfg_lang="$(grep -i -m1 -E '^(lang|language|locale)=' "/usr/local/directadmin/data/users/$user/user.conf" | cut -d= -f2-)"
lang="$(normalize_lang "$cfg_lang")"
fi
if [ "$lang" = "pl" ]; then
label="BorgBackup - Przywracanie plików"
else
label="BorgBackup - File Restore"
fi
printf '[{"name":"%s","icon":"","entries":[{"name":"%s","icon":"","href":"/CMD_PLUGINS/borg-restore","newTab":false,"updates":0}]}]\n' "$label" "$label"
+1
View File
@@ -0,0 +1 @@
<a href="/CMD_PLUGINS/borg-restore">BorgBackup - Przywracanie plików</a>