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:
@@ -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
|
||||
Reference in New Issue
Block a user