Archived
1
0
This repository has been archived on 2021-10-08. You can view files and clone it, but cannot push or open issues or pull requests.
ACU/commands/first-install.sh
2013-09-14 11:16:00 +02:00

29 lines
568 B
Bash
Executable File

#! /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 &&
mkdir -p /home/intradmin
fi
chown -R intradmin:intradmin /home/intradmin
echo "System ready!"