Created
October 31, 2018 14:28
-
-
Save alpap/0774f37e8d185cc03349f694201edaf7 to your computer and use it in GitHub Desktop.
servicemd
This file contains 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
cat <<'EOF' > /etc/systemd/system/beepkg.service | |
[Unit] | |
Description=beepkg | |
AssertPathExists=/usr/local/beepkg | |
[Service] | |
WorkingDirectory=/usr/local/beepkg | |
ExecStart=/usr/local/beepkg/beepkg | |
ExecReload=/bin/kill -HUP $MAINPID | |
LimitNOFILE=65536 | |
Restart=always | |
RestartSec=5 | |
[Install] | |
WantedBy=multi-user.target | |
EOF | |
Install service | |
chmod +x beepkg | |
chmod 644 /etc/systemd/system/beepkg.service | |
systemctl daemon-reload | |
systemctl enable beepkg | |
systemctl start beepkg | |
systemctl status beepkg |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment