Skip to content

Instantly share code, notes, and snippets.

@avargas
Created November 9, 2018 01:12
Show Gist options
  • Save avargas/678ecb48a5a39955fe172acf02bd398f to your computer and use it in GitHub Desktop.
Save avargas/678ecb48a5a39955fe172acf02bd398f to your computer and use it in GitHub Desktop.
systemd service for php worker
[Unit]
Description=pdr worker serivice @ %I
After=network.target
[Service]
Type=simple
User=www-data
ExecStart=/usr/bin/php /app/live/bin/run-worker
ExecReload=/bin/kill -HUP $MAINPID
ExecStop=/bin/kill -SIGTERM $MAINPID
TimeoutStartSec=10
TimeoutStopSec=30
Restart=always
RestartSec=5s
KillMode=process
[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment