Files
albumik_ynh/scripts/remove
2026-05-01 09:11:42 +02:00

21 lines
543 B
Bash
Executable File

#!/bin/bash
set -euo pipefail
source ./_common.sh
domain=$(yunohost app setting "$app" domain 2>/dev/null || echo "")
systemctl disable --now "$app" 2>/dev/null || true
rm -f "$service_file"
systemctl daemon-reload || true
if [ -n "$domain" ]; then
rm -f "/etc/nginx/conf.d/$domain.d/$app.conf"
nginx -t && systemctl reload nginx || true
fi
rm -rf "$install_dir" "$config_dir"
# Dane użytkownika zostawiamy bezpiecznie. Usuń ręcznie, jeśli naprawdę chcesz:
# rm -rf "$data_dir"
echo "Albumik removed. Data left in $data_dir"