A second qmail instance on SME Server, see https://wiki.contribs.org/AltQmail
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

48 lines
1.1 KiB

11 years ago
#! /bin/sh
exec 2>&1
/bin/mount --bind /var/qmail/bin/ root/var/qmail/bin
11 years ago
if [ ! -d root/etc ]; then
mkdir root/etc
cp -a /etc/resolv.conf root/etc
cp -a /etc/services root/etc
cp -a /etc/passwd root/etc
cp -a /etc/group root/etc
fi
LIBDIR="lib"
LIBC="2.5"
if [ -d /lib64 ]; then
LIBDIR="lib64"
fi
if [ -e /$LIBDIR/libc-2.12.so ]; then
LIBC="2.12"
fi
if [ ! -d root/$LIBDIR ]; then
mkdir root/$LIBDIR
cp -a /$LIBDIR/libc-$LIBC.so root/$LIBDIR
ln -s libc-$LIBC.so root/$LIBDIR/libc.so.6
cp -a /$LIBDIR/ld-$LIBC.so root/$LIBDIR
if [ -d /lib64 ]; then
ln -s ld-$LIBC.so root/$LIBDIR/ld-linux-x86-64.so.2
else
ln -s ld-$LIBC.so root/$LIBDIR/ld-linux.so.2
fi
cp -a /$LIBDIR/libnss_files-$LIBC.so root/$LIBDIR
ln -s libnss_files-$LIBC.so root/$LIBDIR/libnss_files.so.2
cp -a /$LIBDIR/libresolv-$LIBC.so root/$LIBDIR
ln -s libresolv-$LIBC.so root/$LIBDIR/libresolv.so.2
11 years ago
fi
chown qmails:qmail root/var/qmail/queue/lock/trigger
chmod 622 root/var/qmail/queue/lock/trigger
exec \
/usr/bin/env - PATH="/var/qmail/bin:/bin:/usr/bin:/usr/local/bin" \
/usr/sbin/chroot root /var/qmail/bin/qmail-start \
./Maildir/