add files for csync container
This commit is contained in:
8
build/boot/csync.sh
Normal file
8
build/boot/csync.sh
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
set -e
|
||||||
|
# if [ ! -e $CSYNC_CONFIG ]; then
|
||||||
|
# cp /usr/local/etc/csync2* /host/etc/
|
||||||
|
# fi
|
||||||
|
# rm -r /usr/local/etc
|
||||||
|
# csync2 -k /host/etc/csync2.pem
|
||||||
|
# ln -sf /host/etc/ /usr/local/etc
|
||||||
4
build/make/csync.mk
Normal file
4
build/make/csync.mk
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
csync: base compile
|
||||||
|
$(call script,$@)
|
||||||
|
$(call runit,xinetd)
|
||||||
|
$(call boot,02,$@)
|
||||||
3
build/runit/xinetd
Normal file
3
build/runit/xinetd
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
set -e
|
||||||
|
/usr/sbin/xinetd -d
|
||||||
40
build/scripts/csync.sh
Normal file
40
build/scripts/csync.sh
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
## Configuration
|
||||||
|
export_env CSYNC_VERSION 2.0
|
||||||
|
export_env CSYNC_CONFIG /host/etc/csync/csync2.cfg
|
||||||
|
|
||||||
|
## Dependencies
|
||||||
|
apt_install_permanent librsync-dev libsqlite3-dev libgnutls28-dev pkg-config
|
||||||
|
|
||||||
|
## Csync2
|
||||||
|
cd /opt
|
||||||
|
wget http://oss.linbit.com/csync2/csync2-$CSYNC_VERSION.tar.gz
|
||||||
|
tar xzvf csync2-$CSYNC_VERSION.tar.gz
|
||||||
|
cd csync2-$CSYNC_VERSION
|
||||||
|
./configure
|
||||||
|
make
|
||||||
|
make install
|
||||||
|
make cert
|
||||||
|
|
||||||
|
## xinetd
|
||||||
|
apt_install_permanent xinetd
|
||||||
|
|
||||||
|
## Configuration
|
||||||
|
cat << EOF > /etc/xinetd.d/csync2
|
||||||
|
service csync2
|
||||||
|
{
|
||||||
|
disable = no
|
||||||
|
protocol = tcp
|
||||||
|
socket_type = stream
|
||||||
|
wait = no
|
||||||
|
user = root
|
||||||
|
server = /usr/local/sbin/csync2
|
||||||
|
server_args = -i
|
||||||
|
}
|
||||||
|
EOF
|
||||||
|
echo "csync2 30865/tcp" >> /etc/services
|
||||||
|
|
||||||
|
## Remove installation files
|
||||||
|
if [ $MODE == "minimal" ]; then
|
||||||
|
cd /opt
|
||||||
|
rm -rf csync2-$CSYNC_VERSION*
|
||||||
|
fi
|
||||||
Reference in New Issue
Block a user