Skip to content

Instantly share code, notes, and snippets.

@ridingintraffic
Last active October 5, 2018 15:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ridingintraffic/b860042351c2a45c84046442f5d5474a to your computer and use it in GitHub Desktop.
Save ridingintraffic/b860042351c2a45c84046442f5d5474a to your computer and use it in GitHub Desktop.
[Unit]
Description=emu power
Wants=network-online.target
After=network-online.target
AssertFileIsExecutable=/home/pi/emu.py
[Service]
WorkingDirectory=/home/pi
User=pi
Group=pi
PermissionsStartOnly=true
ExecStart=/usr/bin/python /home/pi/emu.py
# Let systemd restart this service only if it has ended with the clean exit code or signal.
Restart=on-success
StandardOutput=journal
StandardError=inherit
# Specifies the maximum file descriptor number that can be opened by this process
LimitNOFILE=65536
# Disable timeout logic and wait until process is stopped
TimeoutStopSec=0
# SIGTERM signal is used to stop Minio
KillSignal=SIGTERM
SendSIGKILL=no
SuccessExitStatus=0
[Install]
WantedBy=multi-user.target
# Built for ${project.name}-${project.version} (${project.name})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment