Skip to content

ServerKit is a lightweight, modern server control panel for managing web applications, databases, and services on your VPS or dedicated server. Built with Python/Flask backend and React frontend.

Add tracking for install, update, and uninstall events

Juan Denisfc02f4063680
diff --git a/install.sh b/install.sh
index c2da3031..2d67d3d4 100644
--- a/install.sh
+++ b/install.sh
@@ -317,6 +317,10 @@ fi
echo ""
if [ "$BACKEND_OK" = true ] && [ "$FRONTEND_OK" = true ]; then
+ # Track successful install
+ INSTALLED_VERSION=$(cat "$INSTALL_DIR/VERSION" 2>/dev/null | tr -d '\n\r ')
+ curl -s "https://serverkit.ai/track/install?v=${INSTALLED_VERSION}" >/dev/null 2>&1 || true
+
echo -e "${GREEN}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━${NC}"
echo -e "${GREEN} Installation Complete!${NC}"
echo -e "${GREEN}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━${NC}"
diff --git a/serverkit b/serverkit
index 675a35fb..1d606d68 100644
--- a/serverkit
+++ b/serverkit
@@ -472,6 +472,9 @@ cmd_update() {
sleep 5
+ # Track successful update
+ curl -s "https://serverkit.ai/track/update?v=${NEW_VERSION}" >/dev/null 2>&1 || true
+
echo ""
print_success "ServerKit updated!"
echo " Branch: $target_branch"
@@ -506,6 +509,10 @@ cmd_uninstall() {
echo
if [[ $REPLY =~ ^[Yy]$ ]]; then
+ # Track uninstall before removing files
+ UNINSTALL_VERSION=$(get_local_version)
+ curl -s "https://serverkit.ai/track/uninstall?v=${UNINSTALL_VERSION}" >/dev/null 2>&1 || true
+
print_info "Stopping services..."
systemctl stop $BACKEND_SERVICE 2>/dev/null || true
systemctl disable $BACKEND_SERVICE 2>/dev/null || true