Commit Graph

12 Commits

Author SHA1 Message Date
Muhammad Ibrahim
1fa0502d7d Modified setup.sh to cater for new environment variables
Added missing env variables in the env.example file
2025-10-05 19:27:55 +01:00
Muhammad Ibrahim
581dc5884c Fixed issue with users not being updated
Re-worked setup.sh to use last 3 tags and the main branch (development latest)
2025-10-05 19:12:51 +01:00
Muhammad Ibrahim
b3887c818d chore: Update GitHub repository URLs from 9technologygroup/patchmon.net to PatchMon/PatchMon 2025-10-03 23:39:58 +01:00
Muhammad Ibrahim
21d6a3b763 fixed lefthook error on setup.sh 2025-09-30 08:06:03 +01:00
Muhammad Ibrahim
33b2b4b0fe fixed syntax issue in setup.sh 2025-09-30 08:02:30 +01:00
Muhammad Ibrahim
61ca05526b fixed setup installer file 2025-09-30 07:54:50 +01:00
Muhammad Ibrahim
b49ea6b197 Update PatchMon version to 1.2.7
- Updated agent script version to 1.2.7
- Updated all package.json files to version 1.2.7
- Updated backend version references
- Updated setup script version references
- Fixed agent file path issues in API endpoints
- Fixed linting issues (Node.js imports, unused variables, accessibility)
- Created comprehensive version update guide in patchmon-admin/READMEs/
2025-09-29 20:42:14 +01:00
Muhammad Ibrahim
78f4eff375 fix: correct package versions and npm flags
Frontend package.json fixes:
- react-router-dom: ^6.31.0 → ^6.30.1 (6.31.0 doesn't exist)
- postcss: ^8.5.1 → ^8.5.6 (use latest stable version)

Setup script fixes:
- Replace deprecated --production flag with --omit=dev
- Resolves npm warning: 'npm WARN config production Use --omit=dev instead'

Fixes npm install errors:
- 'No matching version found for react-router-dom@^6.31.0'
- Deprecated npm configuration warnings
2025-09-24 20:07:36 +01:00
Muhammad Ibrahim
c4376d35c9 setup: add intelligent package manager detection for Debian 13+
- Add detect_package_manager() function that prefers 'apt' over 'apt-get'
- Use PKG_MANAGER variables throughout script for consistency
- Support both modern Debian 13+ (apt) and older systems (apt-get)
- Automatically detect and use the best available package manager
- Better error handling when no package manager is found

Fixes compatibility with:
- Debian 13 (Trixie) and newer
- Ubuntu 22.04+ (prefers apt)
- Older Debian/Ubuntu systems (fallback to apt-get)

All package operations now use the detected package manager:
- System updates and upgrades
- Prerequisites installation
- Node.js, PostgreSQL, nginx, certbot installation
2025-09-24 19:55:42 +01:00
Muhammad Ibrahim
456184d327 setup: improve sudo handling and add root checks
- Add root permission check at startup
- Install sudo automatically if not present (for Debian systems)
- Add run_as_user() helper function with better error handling
- Provide fallback PostgreSQL setup using 'su' when sudo unavailable
- Replace all sudo -u commands with the new helper function
- Better error messages for missing users/sudo

This ensures compatibility with minimal Debian systems that don't have sudo by default.
2025-09-24 19:25:49 +01:00
Muhammad Ibrahim
a9c579bdd0 setup: fix IP address handling for database/service names
- Detect when FQDN starts with digit (IP address)
- Generate 2 random letter prefix for database/service names
- Use prefixed names for DB_NAME, DB_USER, INSTANCE_USER
- Keep original FQDN for nginx configs and URLs
- Prevents PostgreSQL errors with numeric database names

Example: 192.168.1.50 -> xy192_168_1_50 for services
2025-09-24 19:22:32 +01:00
Muhammad Ibrahim
be549d4b34 Added README.md file -- finally !
Added self-hosting easy installer script -- finally !
2025-09-24 09:08:20 +01:00