Subversion Repositories eon

Rev

Rev 68 | Blame | Compare with Previous | Last modification | View Log | RSS feed

#!/bin/sh

prefix=/opt/emg
program=`cat configure.ac | grep AC_INIT | cut -d '(' -f 2 | cut -d ',' -f 1`
group="emg"
user="emg"

echo $program

if getent group $group > /dev/null; then
    echo "emg group already exists."
else
    groupadd -f $group
    echo "emg group has been created."
fi

if getent passwd $user > /dev/null; then
    echo "emg user already exists."
else
    useradd -M -N -r -s /bin/false -c "Disabled emg member" $user
    echo "emg user has been created (no shell)."
fi

./configure --prefix=$prefix
make install

ln -sf $prefix/etc/init.d/$program.sh /etc/init.d/$program.sh
cd $prefix/etc/init.d; update-rc.d $program.sh defaults