Project Manager is a lightweight system service that automatically starts, stops, and monitors multiple projects on your server or workstation. It uses GNU Screen for persistent terminal sessions and systemd for reliable service management, making it ideal for managing development servers, automation scripts, and long-running processes.
- Automatic Startup: Projects start automatically on system boot via systemd
- Persistent Sessions: Uses GNU Screen to keep projects running in the background
- Multi-User Support: Run different projects under different user accounts
- Centralized Management: Control all projects from a single configuration file
- Service Integration: Full systemd integration with enable/disable/status support
- Log Management: Automatic log rotation using logrotate
- Lock Protection: Prevents multiple instances from running simultaneously
- Graceful Shutdown: Properly stops all projects during system shutdown
- systemd: Service management and automatic startup
- GNU Screen: Persistent terminal sessions for background processes
- Bash: Shell scripting for project management
- logrotate: Automatic log file rotation and compression
- Debian, Ubuntu, or any Debian-based Linux distribution
- systemd (pre-installed on most modern Linux systems)
- Root/sudo access for installation
- GNU Screen (automatically installed during setup)
- Clone or download this repository:
git clone https://github.com/Vu4ll/project-manager project-manager
cd project-manager- Run the installation script as root:
sudo ./install.shThe installer will:
- Install GNU Screen if not already present
- Create necessary directories
- Copy files to system locations
- Set up the systemd service
- Configure log rotation
Edit the configuration file to add your projects:
sudo nano /etc/project-manager/projects.confEach line represents one project with the following format:
project_name|project_path|start_command|user_name
# Web application
myWebProject|/home/vu4ll/projects/myweb|npm start|vu4ll
# Python script
dataAnalysis|/home/vu4ll/projects/data_analysis|python analyze.py|vu4ll
# Django development server
djangoApp|/home/vu4ll/projects/django_app|python manage.py runserver|vu4ll
# Node.js API server
apiServer|/home/vu4ll/projects/api|node server.js|vu4llNotes:
- Lines starting with
#are comments project_name: Unique identifier for the screen sessionproject_path: Working directory for the projectstart_command: Command to start the projectuser_name: Linux user account to run the project under
# Start the service immediately
sudo systemctl start project-manager.service
# Enable automatic startup on boot
sudo systemctl enable project-manager.service
# Start and enable in one command
sudo systemctl enable --now project-manager.serviceYou can also use the script directly:
# Start all projects
sudo project-manager.sh start
# Stop all projects
sudo project-manager.sh stop
# Check status of all projects
sudo project-manager.sh status
# Restart all projects
sudo project-manager.sh restart# Check systemd service status
sudo systemctl status project-manager.service
# View logs
sudo tail -f /var/log/project-manager.log
# View journalctl logs
sudo journalctl -u project-manager.service -fTo access a running project's screen session:
# List all screen sessions
screen -ls
# Attach to a specific project
sudo screen -r project_name
# Detach from screen session
# Press: Ctrl+A, then D- Main Script:
/usr/local/bin/project-manager.sh - Configuration:
/etc/project-manager/projects.conf - Systemd Service:
/etc/systemd/system/project-manager.service - Log File:
/var/log/project-manager.log - Logrotate Config:
/etc/logrotate.d/project-manager - Lock File:
/var/run/project-manager.lock
To remove Project Manager from your system:
sudo ./uninstall.shThe uninstall script will:
- Stop and disable the service
- Terminate all running project sessions
- Remove system files
- Ask before removing configuration and logs