add service && debian package
This commit is contained in:
parent
ec62152429
commit
7afceda9cb
17
GNUmakefile
17
GNUmakefile
@ -1,3 +1,20 @@
|
|||||||
VERSION = $(shell git describe --tags)
|
VERSION = $(shell git describe --tags)
|
||||||
|
BUILD_TMP?=.rpm_tmp
|
||||||
|
|
||||||
include common.mk
|
include common.mk
|
||||||
|
|
||||||
|
.PHONY: deb
|
||||||
|
deb:
|
||||||
|
rm -rf ${BUILD_TMP}
|
||||||
|
mkdir -p ${BUILD_TMP}/usr/local/bin/
|
||||||
|
mkdir -p ${BUILD_TMP}/var/lib/goircd/history
|
||||||
|
mkdir -p ${BUILD_TMP}/etc/systemd/system/
|
||||||
|
cp goircd ${BUILD_TMP}/usr/local/bin/
|
||||||
|
cp startup/goircd.service ${BUILD_TMP}/etc/systemd/system/
|
||||||
|
fpm -s dir -t deb -n goircd -v ${VERSION}\
|
||||||
|
-m mengzhuo1203@gmail.com \
|
||||||
|
--deb-compression=bzip2 \
|
||||||
|
--verbose \
|
||||||
|
-d logrotate\
|
||||||
|
-C ${BUILD_TMP}
|
||||||
|
|
||||||
|
11
startup/goircd.service
Normal file
11
startup/goircd.service
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=goIRC daemon
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
ExecStart=/usr/local/bin/goircd -logdir /var/lib/goircd/history
|
||||||
|
Restart=once
|
||||||
|
RestartSec=3s
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
|
Alias=goircd.service
|
Loading…
Reference in New Issue
Block a user