!/bin/bash
apt install mailutils
apt install python
apt install screen
groupadd perforce
useradd -d /p4 -g perforce perforce
chsh -s /bin/bash perforce
mkdir /p4
chown perforce: /p4
cp ~/.bashrc /p4
cp ~/.profile /p4
cd /p4
chown perforce: .*
vi .profile
chown perforce:perforce /mnt/p4meta
chown perforce:perforce /mnt/p4data
cd /mnt/p4data
wget https://swarm.workshop.perforce.com/downloads/guest/russell_jackson/sdp.tgz
tar xvzf sdp.tgz
cd sdp/Server/Unix/p4/common/bin
wget ftp://ftp.perforce.com/perforce/r19.1/bin.linux26x86_64/p4
wget ftp://ftp.perforce.com/perforce/r19.1/bin.linux26x86_64/p4d
cd /mnt/p4data
cd /mnt/p4data
chown -R perforce:perforce sdp
cd sdp/Server/Unix/setup
vi mkdirs.cfg