Skip to content

Instantly share code, notes, and snippets.

@NucciTheBoss
Created September 12, 2022 13:36
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 NucciTheBoss/6fca6fb26fd0fb46f8e08bc3083bbc24 to your computer and use it in GitHub Desktop.
Save NucciTheBoss/6fca6fb26fd0fb46f8e08bc3083bbc24 to your computer and use it in GitHub Desktop.
Systemd service files for my private services!
# sudo snap install pypi-server
# cat << EOF > /etc/systemd/system/pypiserver.service <This file> EOF
# systemctl enable pypiserver
[Unit]
Description=A minimal PyPI server for use with pip/easy_install.
After=network.target
[Service]
Type=simple
PIDFile=/var/run/pypiserver.pid
User=root
Group=root
ExecStart=/snap/bin/pypi-server run -p 8080 /root/packages
ExecStop=/bin/kill -TERM $MAINPID
ExecReload=/bin/kill -HUP $MAINPID
Restart=always
WorkingDirectory=/root/packages
TimeoutStartSec=3
RestartSec=5
[Install]
WantedBy=multi-user.target
@NucciTheBoss
Copy link
Author

This is my collection of custom systemd service files. Usually for snaps that I am wrapping in a charm or deploying as a standalone service.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment