Commit 89794549 authored by Vladimir Bashkirtsev's avatar Vladimir Bashkirtsev

Initial commit

parents
all: vouch-proxy-service
mkdir -p ../go/go/src/github.com/vouch
mkdir -p ../go/gocache
tar xf vouch-proxy-0.21.0.tar.gz -C ../go/go/src/github.com/vouch
mv ../go/go/src/github.com/vouch/vouch-proxy-0.21.0 ../go/go/src/github.com/vouch/vouch-proxy
cd ../go/go/src/github.com/vouch/vouch-proxy && PATH=$$PATH:/build/packages/go/go/bin GOCACHE=$$(pwd)/../../../../../gocache GOPATH=$$(pwd)/../../../.. go mod init
cd ../go/go/src/github.com/vouch/vouch-proxy && PATH=$$PATH:/build/packages/go/go/bin GOCACHE=$$(pwd)/../../../../../gocache GOPATH=$$(pwd)/../../../.. go get -t -v ./...
cd ../go/go/src/github.com/vouch/vouch-proxy && PATH=$$PATH:/build/packages/go/go/bin GOCACHE=$$(pwd)/../../../../../gocache GOPATH=$$(pwd)/../../../.. go build -i -v .
install -v -m755 -d /srv/vouch-proxy
cd ../go/go/src/github.com/vouch/vouch-proxy && install -D -m 755 vouch-proxy /srv/vouch-proxy/vouch-proxy
install -v -m755 -d /srv/vouch-proxy/templates
cd ../go/go/src/github.com/vouch/vouch-proxy && install -v -m644 templates/* /srv/vouch-proxy/templates
@echo "$$VOUCH_PROXY_SERVICE" > /lib/systemd/system/vouch-proxy.service
systemctl enable vouch-proxy.service
rm -rf vouch-proxy-0.21.0
vouch-proxy-service
define VOUCH_PROXY_SERVICE
[Unit]
Description=Vouch Proxy
After=network.target
[Service]
Type=simple
User=root
WorkingDirectory=/run
ExecStart=/srv/vouch-proxy/vouch-proxy -config /etc/vouch-proxy.yml
Restart=on-failure
RestartSec=5
StartLimitInterval=60s
StartLimitBurst=3
[Install]
WantedBy=default.target
endef
export VOUCH_PROXY_SERVICE
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment