+25
-12
@@ -20,23 +20,36 @@ chmod 755 /app/data
|
||||
|
||||
# Удаление старых named pipes если они существуют
|
||||
echo "Cleaning up old named pipes..."
|
||||
rm -f /run/exabgp/exabgp.in /run/exabgp/exabgp.out
|
||||
rm -f /var/run/exabgp/exabgp.in /var/run/exabgp/exabgp.out
|
||||
rm -f /usr/local/run/exabgp/exabgp.in /usr/local/run/exabgp/exabgp.out
|
||||
rm -f /usr/local/var/run/exabgp/exabgp.in /usr/local/var/run/exabgp/exabgp.out
|
||||
for dir in /run/exabgp /var/run/exabgp /usr/local/run/exabgp /usr/local/var/run/exabgp; do
|
||||
if [ -d "$dir" ]; then
|
||||
echo "Cleaning $dir..."
|
||||
rm -f $dir/exabgp.in $dir/exabgp.out
|
||||
rmdir $dir 2>/dev/null || true
|
||||
fi
|
||||
done
|
||||
|
||||
# Создание named pipes для CLI в стандартном месте
|
||||
echo "Creating named pipes for ExaBGP CLI..."
|
||||
mkdir -p /run/exabgp
|
||||
mkfifo /run/exabgp/exabgp.in /run/exabgp/exabgp.out
|
||||
chmod 666 /run/exabgp/exabgp.in /run/exabgp/exabgp.out
|
||||
|
||||
# Также создаем в других стандартных местах
|
||||
for dir in /var/run/exabgp /usr/local/run/exabgp /usr/local/var/run/exabgp; do
|
||||
for dir in /run/exabgp /var/run/exabgp /usr/local/run/exabgp /usr/local/var/run/exabgp; do
|
||||
mkdir -p $dir
|
||||
echo "Creating named pipes in $dir..."
|
||||
mkfifo $dir/exabgp.in $dir/exabgp.out
|
||||
chmod 666 $dir/exabgp.in $dir/exabgp.out
|
||||
|
||||
# Проверяем, существуют ли уже named pipes
|
||||
if [ ! -p "$dir/exabgp.in" ]; then
|
||||
mkfifo $dir/exabgp.in
|
||||
chmod 666 $dir/exabgp.in
|
||||
echo "Created $dir/exabgp.in"
|
||||
else
|
||||
echo "Named pipe $dir/exabgp.in already exists"
|
||||
fi
|
||||
|
||||
if [ ! -p "$dir/exabgp.out" ]; then
|
||||
mkfifo $dir/exabgp.out
|
||||
chmod 666 $dir/exabgp.out
|
||||
echo "Created $dir/exabgp.out"
|
||||
else
|
||||
echo "Named pipe $dir/exabgp.out already exists"
|
||||
fi
|
||||
done
|
||||
|
||||
# Проверка наличия файлов с префиксами
|
||||
|
||||
Reference in New Issue
Block a user