Add f7push v0.1: FCM device registry and push API for F7cloud.

Portable occ-based config, OCS endpoints for APK registration, notification relay, and server-side push dispatch.
This commit is contained in:
root
2026-05-24 10:26:36 +03:00
commit df4e2dddec
17 changed files with 1005 additions and 0 deletions
+12
View File
@@ -0,0 +1,12 @@
#!/usr/bin/env bash
# Print or set f7push API secret on this F7cloud server.
set -euo pipefail
cd /var/www/f7cloud
if [[ "${1:-}" == "--regenerate" ]]; then
SECRET=$(openssl rand -base64 36 | tr -d '/+=' | head -c 48)
sudo -u www-data php occ config:app:set f7push api_secret --value="$SECRET"
echo "$SECRET"
else
sudo -u www-data php occ config:app:get f7push api_secret 2>/dev/null || true
echo "(If empty, call POST /push once or run with --regenerate)"
fi