mirror of
https://github.com/gophernicus/gophernicus.git
synced 2025-02-02 15:08:00 -05:00
Added systemd support for Debian package
This commit is contained in:
parent
72f95a844a
commit
f85c0bf159
1
debian/dirs
vendored
1
debian/dirs
vendored
@ -2,3 +2,4 @@ usr/sbin
|
||||
var/gopher
|
||||
var/log/gophernicus
|
||||
usr/lib/gophernicus/filters
|
||||
lib/systemd/system
|
||||
|
9
debian/postinst
vendored
9
debian/postinst
vendored
@ -34,8 +34,13 @@ if [ "$1" = "configure" ]; then
|
||||
sed -i -e "s|__PACKAGE__|$PACKAGE|g" $DEFAULT
|
||||
sed -i -e "s|__LOGDIR__|$LOGDIR|g" $DEFAULT
|
||||
|
||||
if [ -f /etc/inetd.conf -a -x /usr/sbin/update-inetd ]; then
|
||||
/usr/sbin/update-inetd --add "gopher\t\tstream\ttcp\tnowait\t$USER\t/usr/sbin/$BINARY\t$BINARY -h $HOSTNAME -l $LOGDIR/server.log -f /usr/lib/$PACKAGE/filters"
|
||||
if [ -x /usr/bin/deb-systemd-helper -a -d /run/systemd/system ]; then
|
||||
/usr/bin/deb-systemd-helper enable gophernicus.socket
|
||||
/usr/bin/deb-systemd-invoke start gophernicus.socket
|
||||
else
|
||||
if [ -f /etc/inetd.conf -a -x /usr/sbin/update-inetd ]; then
|
||||
/usr/sbin/update-inetd --add "gopher\t\tstream\ttcp\tnowait\t$USER\t/usr/sbin/$BINARY\t$BINARY -h $HOSTNAME -l $LOGDIR/server.log -f /usr/lib/$PACKAGE/filters"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
|
2
debian/postrm
vendored
2
debian/postrm
vendored
@ -4,7 +4,7 @@ if [ "$1" = "purge" -a -f /etc/inetd.conf -a -x /usr/sbin/update-inetd ]; then
|
||||
/usr/sbin/update-inetd --remove "#<off># gopher"
|
||||
fi
|
||||
|
||||
if [ -d "/run/systemd/system" ]; then
|
||||
if [ -d /run/systemd/system ]; then
|
||||
systemctl --system daemon-reload >/dev/null || true
|
||||
fi
|
||||
|
||||
|
2
debian/prerm
vendored
2
debian/prerm
vendored
@ -4,7 +4,7 @@ if [ -f /etc/inetd.conf -a -x /usr/sbin/update-inetd ]; then
|
||||
/usr/sbin/update-inetd --disable gopher
|
||||
fi
|
||||
|
||||
if [ -x "/usr/bin/deb-systemd-helper" ]; then
|
||||
if [ -x /usr/bin/deb-systemd-helper ]; then
|
||||
/usr/bin/deb-systemd-helper disable gophernicus.socket >/dev/null
|
||||
fi
|
||||
|
||||
|
1
debian/rules
vendored
1
debian/rules
vendored
@ -44,6 +44,7 @@ install: build
|
||||
ln -s /usr/share/doc/gophernicus/ $(DEST)/var/gopher/docs
|
||||
ln -s /usr/bin/php5 $(DEST)/usr/lib/gophernicus/filters/php
|
||||
cp $(CURDIR)/gophermap $(DEST)/usr/lib/gophernicus/
|
||||
cp $(CURDIR)/gophernicus.socket $(CURDIR)/gophernicus@.service $(DEST)/lib/systemd/system/
|
||||
|
||||
# Build architecture-independent files here.
|
||||
binary-indep: build install
|
||||
|
Loading…
x
Reference in New Issue
Block a user