added systemd start script for debian build
This commit is contained in:
@@ -4,13 +4,9 @@
|
|||||||
# Options to pass to ebusd (run "ebusd -?" for more info):
|
# Options to pass to ebusd (run "ebusd -?" for more info):
|
||||||
EBUSD_OPTS="--scanconfig"
|
EBUSD_OPTS="--scanconfig"
|
||||||
|
|
||||||
# In order to run multiple ebusd instances, simply define several EBUSD_OPTS
|
# MULTIPLE EBUSD INSTANCES WITH SYSTEMD
|
||||||
# with a unique suffix for each.
|
# In order to run muiltiple ebusd instances on a systemd enabled system, just
|
||||||
# Recommended is using a number as suffix for all EBUSD_OPTS settings.
|
# copy the /usr/lib/systemd/system/ebusd.service file to /etc/systemd/system/
|
||||||
# That number can then be used as additional "instance" parameter to the init.d
|
# with a different name (e.g. ebusd-2.service), remove the line starting with
|
||||||
# script in order to start/stop an individual ebusd instance instead of all
|
# 'EnvironmentFile=', and replace the '$EBUSD_OPTS' with the options for that
|
||||||
# instances.
|
# particular ebusd instance.
|
||||||
# Example (uncomment the EBUSD_OPTS above):
|
|
||||||
#EBUSD_OPTS1="--scanconfig -d /dev/serial/by-id/usb-FTDI_FT232R_USB_UART_A50285BI-if00-port0 -p 8888 -l /var/log/ebusd1.log"
|
|
||||||
#EBUSD_OPTS2="--scanconfig -d /dev/serial/by-id/usb-FTDI_FT232R_USB_UART_A900acTF-if00-port0 -p 8889 -l /var/log/ebusd2.log"
|
|
||||||
#EBUSD_OPTS3="--scanconfig -d /dev/serial/by-id/usb-FTDI_FT232R_USB_UART_A900beCG-if00-port0 -p 8890 -l /var/log/ebusd3.log"
|
|
||||||
|
|||||||
@@ -4,13 +4,20 @@
|
|||||||
# Options to pass to ebusd (run "ebusd -?" for more info):
|
# Options to pass to ebusd (run "ebusd -?" for more info):
|
||||||
EBUSD_OPTS="--scanconfig"
|
EBUSD_OPTS="--scanconfig"
|
||||||
|
|
||||||
# In order to run multiple ebusd instances, simply define several EBUSD_OPTS
|
# MULTIPLE EBUSD INSTANCES WITH SYSV
|
||||||
# with a unique suffix for each.
|
# In order to run multiple ebusd instances on a SysV enabled system, simply
|
||||||
# Recommended is using a number as suffix for all EBUSD_OPTS settings.
|
# define several EBUSD_OPTS with a unique suffix for each. Recommended is to
|
||||||
# That number can then be used as additional "instance" parameter to the init.d
|
# use a number as suffix for all EBUSD_OPTS settings. That number will then be
|
||||||
# script in order to start/stop an individual ebusd instance instead of all
|
# taken as additional "instance" parameter to the init.d script in order to
|
||||||
# instances.
|
# start/stop an individual ebusd instance instead of all instances.
|
||||||
# Example (uncomment the EBUSD_OPTS above):
|
# Example: (uncomment the EBUSD_OPTS above)
|
||||||
#EBUSD_OPTS1="--scanconfig -d /dev/serial/by-id/usb-FTDI_FT232R_USB_UART_A50285BI-if00-port0 -p 8888 -l /var/log/ebusd1.log"
|
#EBUSD_OPTS1="--scanconfig -d /dev/serial/by-id/usb-FTDI_FT232R_USB_UART_A50285BI-if00-port0 -p 8888 -l /var/log/ebusd1.log"
|
||||||
#EBUSD_OPTS2="--scanconfig -d /dev/serial/by-id/usb-FTDI_FT232R_USB_UART_A900acTF-if00-port0 -p 8889 -l /var/log/ebusd2.log"
|
#EBUSD_OPTS2="--scanconfig -d /dev/serial/by-id/usb-FTDI_FT232R_USB_UART_A900acTF-if00-port0 -p 8889 -l /var/log/ebusd2.log"
|
||||||
#EBUSD_OPTS3="--scanconfig -d /dev/serial/by-id/usb-FTDI_FT232R_USB_UART_A900beCG-if00-port0 -p 8890 -l /var/log/ebusd3.log"
|
#EBUSD_OPTS3="--scanconfig -d /dev/serial/by-id/usb-FTDI_FT232R_USB_UART_A900beCG-if00-port0 -p 8890 -l /var/log/ebusd3.log"
|
||||||
|
|
||||||
|
# MULTIPLE EBUSD INSTANCES WITH SYSTEMD
|
||||||
|
# In order to run muiltiple ebusd instances on a systemd enabled system, just
|
||||||
|
# copy the /usr/lib/systemd/system/ebusd.service file to /etc/systemd/system/
|
||||||
|
# with a different name (e.g. ebusd-2.service), remove the line starting with
|
||||||
|
# 'EnvironmentFile=', and replace the '$EBUSD_OPTS' with the options for that
|
||||||
|
# particular ebusd instance.
|
||||||
|
|||||||
@@ -0,0 +1,14 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=ebusd, the daemon for communication with eBUS heating systems.
|
||||||
|
After=network.target
|
||||||
|
ConditionPathExists=/var/log
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=forking
|
||||||
|
Restart=always
|
||||||
|
PIDFile=/var/run/ebusd.pid
|
||||||
|
EnvironmentFile=-/etc/conf.d/ebusd
|
||||||
|
ExecStart=/usr/bin/ebusd $EBUSD_OPTS
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
+17
-5
@@ -54,10 +54,17 @@ echo "*************"
|
|||||||
echo " pack"
|
echo " pack"
|
||||||
echo "*************"
|
echo "*************"
|
||||||
echo
|
echo
|
||||||
mkdir -p $RELEASE/DEBIAN $RELEASE/etc/init.d $RELEASE/etc/default $RELEASE/etc/ebusd $RELEASE/etc/logrotate.d || exit 1
|
mkdir -p $RELEASE/DEBIAN $RELEASE/etc/default $RELEASE/etc/ebusd $RELEASE/etc/logrotate.d || exit 1
|
||||||
rm $RELEASE/usr/bin/ebusfeed
|
rm $RELEASE/usr/bin/ebusfeed
|
||||||
cp contrib/debian/init.d/ebusd $RELEASE/etc/init.d/ebusd || exit 1
|
if [ -d /run/systemd/system ]; then
|
||||||
cp contrib/debian/default/ebusd $RELEASE/etc/default/ebusd || exit 1
|
mkdir -p $RELEASE/lib/systemd/system || exit 1
|
||||||
|
cp contrib/debian/systemd/ebusd.service $RELEASE/lib/systemd/system/ebusd.service || exit 1
|
||||||
|
cp contrib/debian/default/ebusd $RELEASE/etc/default/ebusd || exit 1
|
||||||
|
else
|
||||||
|
mkdir -p $RELEASE/etc/init.d || exit 1
|
||||||
|
cp contrib/debian/init.d/ebusd $RELEASE/etc/init.d/ebusd || exit 1
|
||||||
|
cp contrib/debian/default/ebusd $RELEASE/etc/default/ebusd || exit 1
|
||||||
|
fi
|
||||||
cp contrib/etc/ebusd/* $RELEASE/etc/ebusd/ || exit 1
|
cp contrib/etc/ebusd/* $RELEASE/etc/ebusd/ || exit 1
|
||||||
cp contrib/etc/logrotate.d/ebusd $RELEASE/etc/logrotate.d/ || exit 1
|
cp contrib/etc/logrotate.d/ebusd $RELEASE/etc/logrotate.d/ || exit 1
|
||||||
cp ChangeLog.md $RELEASE/DEBIAN/changelog || exit 1
|
cp ChangeLog.md $RELEASE/DEBIAN/changelog || exit 1
|
||||||
@@ -70,18 +77,23 @@ Architecture: $ARCH
|
|||||||
Maintainer: John Baier <ebusd@ebusd.eu>
|
Maintainer: John Baier <ebusd@ebusd.eu>
|
||||||
Homepage: https://github.com/john30/ebusd
|
Homepage: https://github.com/john30/ebusd
|
||||||
Bugs: https://github.com/john30/ebusd/issues
|
Bugs: https://github.com/john30/ebusd/issues
|
||||||
Depends: libstdc++6 (>= 4.8.1), libc6, libgcc1$extralibs
|
Depends: logrotate, libstdc++6 (>= 4.8.1), libc6, libgcc1$extralibs
|
||||||
Description: eBUS daemon.
|
Description: eBUS daemon.
|
||||||
ebusd is a daemon for handling communication with eBUS devices connected to a
|
ebusd is a daemon for handling communication with eBUS devices connected to a
|
||||||
2-wire bus system.
|
2-wire bus system.
|
||||||
EOF
|
EOF
|
||||||
cat <<EOF > $RELEASE/DEBIAN/dirs
|
cat <<EOF > $RELEASE/DEBIAN/dirs
|
||||||
/etc/ebusd
|
/etc/ebusd
|
||||||
/etc/init.d
|
|
||||||
/etc/default
|
/etc/default
|
||||||
/etc/logrotate.d
|
/etc/logrotate.d
|
||||||
/usr/bin
|
/usr/bin
|
||||||
EOF
|
EOF
|
||||||
|
if [ -d /run/systemd/system ]; then
|
||||||
|
echo /lib/systemd/system >> $RELEASE/DEBIAN/dirs
|
||||||
|
else
|
||||||
|
echo /etc/init.d >> $RELEASE/DEBIAN/dirs
|
||||||
|
fi
|
||||||
|
|
||||||
cat <<EOF > $RELEASE/DEBIAN/postinst
|
cat <<EOF > $RELEASE/DEBIAN/postinst
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
echo "Instructions:"
|
echo "Instructions:"
|
||||||
|
|||||||
Reference in New Issue
Block a user