Blog của Sang

Systemd Service — Best Practices

Cấu trúc cơ bản

[Unit]
Description=My Service
After=network-online.target
Wants=network-online.target

[Service]
Type=simple
ExecStart=/usr/local/bin/myapp
Restart=on-failure
RestartSec=5

[Install]
WantedBy=multi-user.target

Best practices


← Back to all posts