Skip to content

Instantly share code, notes, and snippets.

@dillonhafer
Created May 2, 2019 15:06
Show Gist options
  • Save dillonhafer/6c0fba84debc8043a70a004547de6b49 to your computer and use it in GitHub Desktop.
Save dillonhafer/6c0fba84debc8043a70a004547de6b49 to your computer and use it in GitHub Desktop.
[Unit]
Description=Budgetal
ConditionPathExists=/home/deploy/budgetal-beta/budgetal
After=network.target
[Service]
EnvironmentFile=/home/deploy/budgetal-beta/budgetal-env
Type=simple
User=deploy
Group=deploy
LimitNOFILE=1024
Restart=on-failure
RestartSec=10
startLimitIntervalSec=60
WorkingDirectory=/home/deploy/budgetal-beta
ExecStart=/home/deploy/budgetal-beta/budgetal
# make sure log directory exists and owned by syslog
PermissionsStartOnly=true
ExecStartPre=/bin/mkdir -p /var/log/budgetal-beta
ExecStartPre=/bin/chown syslog:adm /var/log/budgetal-beta
ExecStartPre=/bin/chmod 755 /var/log/budgetal-beta
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=budgetal
[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment