Upload full Albumik YunoHost package

This commit is contained in:
adminsopel
2026-05-01 09:06:44 +02:00
parent 2145989988
commit f8beabe293
16 changed files with 1690 additions and 0 deletions

32
scripts/_common.sh Executable file
View File

@@ -0,0 +1,32 @@
#!/bin/bash
set -euo pipefail
app=${YNH_APP_INSTANCE_NAME:-albumik}
install_dir="/var/www/$app"
data_dir="/home/yunohost.app/$app"
config_dir="/etc/$app"
service_file="/etc/systemd/system/$app.service"
find_free_port() {
python3 - <<'PY'
import socket
for p in range(8097, 8297):
s=socket.socket()
try:
s.bind(('127.0.0.1', p))
print(p)
break
except OSError:
pass
finally:
s.close()
PY
}
normalize_path() {
local p="$1"
[ -z "$p" ] && p="/"
[[ "$p" != /* ]] && p="/$p"
[ "$p" != "/" ] && p="${p%/}"
echo "$p"
}