Merge branch 'main' of https://github.com/community-scripts/ProxmoxVED
This commit is contained in:
@@ -68,4 +68,4 @@ echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
|
||||
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
|
||||
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}${CL}"
|
||||
echo -e "${INFO}${YW} To create an admin account, run:${CL}"
|
||||
echo -e "${TAB}${BGN}echo 'GEOPULSE_ADMIN_EMAIL=you@example.com' >> /etc/geopulse/geopulse.env && systemctl restart geopulse-backend${CL}"
|
||||
echo -e "${TAB}${BGN}/usr/local/bin/create-geopulse-admin${CL}"
|
||||
|
||||
@@ -184,6 +184,22 @@ systemctl enable -q --now nginx
|
||||
systemctl reload nginx
|
||||
msg_ok "Configured Nginx"
|
||||
|
||||
msg_info "Creating Admin Helper"
|
||||
cat <<'EOF' >/usr/local/bin/create-geopulse-admin
|
||||
#!/usr/bin/env bash
|
||||
read -rp "Enter admin email address: " ADMIN_EMAIL
|
||||
if [[ -z "$ADMIN_EMAIL" ]]; then
|
||||
echo "No email provided. Aborting."
|
||||
exit 1
|
||||
fi
|
||||
sed -i '/^GEOPULSE_ADMIN_EMAIL=/d' /etc/geopulse/geopulse.env
|
||||
echo "GEOPULSE_ADMIN_EMAIL=${ADMIN_EMAIL}" >>/etc/geopulse/geopulse.env
|
||||
systemctl restart geopulse-backend
|
||||
echo "Admin email set to '${ADMIN_EMAIL}'. Register with this email in the GeoPulse UI to receive admin privileges."
|
||||
EOF
|
||||
chmod +x /usr/local/bin/create-geopulse-admin
|
||||
msg_ok "Created Admin Helper"
|
||||
|
||||
motd_ssh
|
||||
customize
|
||||
cleanup_lxc
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
},
|
||||
"notes": [
|
||||
{
|
||||
"text": "To create an admin account: `echo 'GEOPULSE_ADMIN_EMAIL=you@example.com' >> /etc/geopulse/geopulse.env && systemctl restart geopulse-backend` — then register with that email in the UI.",
|
||||
"text": "To create an admin account, run `/usr/local/bin/create-geopulse-admin` inside the container, then register with that email in the GeoPulse UI.",
|
||||
"type": "info"
|
||||
}
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user