Skip to content

Instantly share code, notes, and snippets.

@74th
Created February 3, 2017 00:25
Show Gist options
  • Save 74th/9c74907b8d7e262c9cce4e1f289db927 to your computer and use it in GitHub Desktop.
Save 74th/9c74907b8d7e262c9cce4e1f289db927 to your computer and use it in GitHub Desktop.
Systemd godoc service
[Unit]
Description=godoc service
#Before=nginx
[Service]
Type=simple
USER=jenkins
GROUP=jenkins
Environment=GOPATH=/var/lib/jenkins/gopath/
Environment=GOROOT=/var/lib/jenkins/goroot/go1.7.3/
ExecStart=/var/lib/jenkins/goroot/go1.7.3/bin/godoc -http :8032 -play
[Install]
WantedBy=multi-user.target
@74th
Copy link
Author

74th commented Feb 3, 2017

#!/bin/bash
set -Ceux
cp godoc.service /etc/systemd/system/
systemctl daemon-reload
systemctl enable godoc
systemctl restart godoc

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