Created
September 12, 2022 13:36
-
-
Save NucciTheBoss/6fca6fb26fd0fb46f8e08bc3083bbc24 to your computer and use it in GitHub Desktop.
Systemd service files for my private services!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.