Archived
1
0
Fork 0

Add a script to install requirements

This commit is contained in:
Mercier Pierre-Olivier 2013-09-14 10:52:59 +02:00
parent 82789d394f
commit 4857a0b228
2 changed files with 35 additions and 1 deletions

26
commands/first-install.sh Executable file
View file

@ -0,0 +1,26 @@
#! /bin/bash
# Install missing packets
PACKAGES_LIST="libnet-ldap-perl libxml-libxml-perl"
if ! whereis dpkg > /dev/null 2> /dev/null
then
aptitude install dpkg
fi
for PK in $PACKAGES_LIST
do
if ! dpkg -l | grep "^ii" | grep "$PK" > /dev/null 2> /dev/null
then
aptitude install "$PK"
fi
done
# Add intradmin user if missing
if ! getent passwd | grep "intradmin:" > /dev/null 2> /dev/null
then
useradd --shell /bin/false --uid 942 intradmin
fi
echo "System ready!"