# Keeps the Elegance booking/admin server running, and restarts it after a # crash or a reboot. Install (as root): # 1. replace CPANELUSER below with your cPanel username (2 places + paths) # 2. cp elegance.service /etc/systemd/system/ # 3. systemctl daemon-reload && systemctl enable --now elegance # 4. systemctl status elegance (should say "active (running)") [Unit] Description=Elegance Barbershop - bookings, admin and statistics After=network.target [Service] User=CPANELUSER Group=CPANELUSER WorkingDirectory=/home/CPANELUSER/elegance-app Environment=ELEGANCE_HOST=127.0.0.1 Environment=TRUST_PROXY=1 ExecStart=/usr/bin/python3.9 -u serve.py 4173 Restart=always RestartSec=3 [Install] WantedBy=multi-user.target