Shell script

From test.coolscript.org
Jump to navigation Jump to search
#!/bin/bash
if [ ! -d '/usr/local/logd' ]
then
 echo "mkdir /usr/local/logd "
 mkdir /usr/local/logd
fi
if [ ! -d '/usr/local/logd/tmp' ]
then
 echo "mkdir /usr/local/logd/tmp  "
 mkdir /usr/local/logd/tmp
fi
if [ ! -d '/etc/logd' ]
then
 echo "mkdir /etc/logd/ "
 mkdir /etc/logd/
fi
if [ ! -f '/var/log/logd/logd.pl' ]
then
 echo "cp logd.pl "
fi
echo "Please make sure that these perl modules are installed: "
echo "apt-get install libxml-simple-perl "
echo "apt-get install libarchive-zip-perl"
echo "apt-get install libnet-sftp-foreign-perl"
echo "apt-get install putty"
echo "apt-get install plink"