Link to this headingServices
Link to this headingCommon Commands
Enable and start Service:
Link to this headingExample Services
Docker Service:
Description=Mail
PartOf=docker.service
After=docker.service
Requires=docker.service
Restart=always
RuntimeMaxSec=7d #Update this every week
Type=oneshot
RemainAfterExit=true
WorkingDirectory=/home/generalzero/docker/
ExecStartPre=-/usr/local/bin/docker-compose
ExecStart=/usr/local/bin/docker-compose
ExecStop=/usr/local/bin/docker-compose
ExecReload=/usr/local/bin/docker-compose
ExecReload=/usr/local/bin/docker-compose
WantedBy=multi-user.target
Docker Cleanup Service:
>>> cat
Description=Docker
Requires=docker.service
After=docker.service
Type=oneshot
WorkingDirectory=/tmp
User=root
Group=root
ExecStart=/usr/bin/docker
WantedBy=multi-user.target
>>> cat
Description=Docker
OnUnitInactiveSec=1w
WantedBy=timers.target
Certificate Renewal Service:
Link to this headingUser Services
Python Service:
Description=Run
After=network.target
ExecStart=python
Type=simple
WorkingDirectory=/programing/cal_grabber
StandardOutput=journal
StandardError=journal