Constructor de unidades systemd
Crea archivos de unidad de servicio systemd con controles visuales.
Ejecutar como root otorga privilegios ilimitados.
Debe apuntar a una ruta absoluta de un binario ejecutable.
Sobrescrituras de entorno
Archivo de unidad de servicio generado
[Unit]
Description=KitLocal Node Daemon
After=network.target
[Service]
Type=simple
User=root
WorkingDirectory=/var/www/kitlocal
Environment=NODE_ENV=production
Environment=PORT=3000
ExecStart=/usr/bin/node server.js
Restart=always
RestartSec=5
[Install]
WantedBy=multi-user.target Activación mediante CLI de Systemd
sudo cp my-app.service /etc/systemd/system/ sudo systemctl daemon-reload sudo systemctl enable my-app sudo systemctl start my-app