mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2024-12-21 23:19:09 +00:00
service file templating
This commit is contained in:
parent
a00275bebd
commit
2afb1851d6
2 changed files with 6 additions and 3 deletions
5
Makefile
5
Makefile
|
@ -24,7 +24,10 @@ build: deps
|
|||
&& export CGO_ENABLED=0 \
|
||||
&& go build -v -mod=vendor -ldflags $(BUILD_FLAGS) -o ${BINARY} ./cli/main.go
|
||||
|
||||
install: build
|
||||
neo-go.service: neo-go.service.template
|
||||
@sed -r -e 's_BINDIR_$(BINDIR)_' -e 's_UNITWORKDIR_$(UNITWORKDIR)_' -e 's_SYSCONFIGDIR_$(SYSCONFIGDIR)_' $< >$@
|
||||
|
||||
install: build neo-go.service
|
||||
@echo "=> Installing systemd service"
|
||||
@mkdir -p $(DESTDIR)$(SYSCONFIGDIR)/neo-go \
|
||||
&& mkdir -p $(SYSTEMDUNIT_DIR) \
|
||||
|
|
|
@ -4,7 +4,7 @@ Requires=network.target
|
|||
|
||||
[Service]
|
||||
Type=simple
|
||||
ExecStart=/usr/bin/neo-go node --mainnet --config-path=/etc/neo-go
|
||||
ExecStart=BINDIR/neo-go node --mainnet --config-path=SYSCONFIGDIR/neo-go
|
||||
User=neo-go
|
||||
Group=neo-go
|
||||
Restart=always
|
||||
|
@ -12,7 +12,7 @@ RestartSec=5
|
|||
StandardError=syslog
|
||||
SyslogIdentifier=neo-go
|
||||
PrivateTmp=true
|
||||
WorkingDirectory=/var/lib/neo-go
|
||||
WorkingDirectory=UNITWORKDIR
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
Loading…
Reference in a new issue