Conspy Install Script
-
Re: Using Conspy to View remote PC imaging progress
Here is the script I use to install conspy on the fogserver/storage nodes.
yum install conspy -y echo -e '#(>)##### UnPacking Init.xz #####' cd /var/www/fog/service/ipxe/ xz -d init.xz mkdir initmountdir echo -e '#(>)##### Mounting Init #####' mount -o loop init initmountdir cd /var/www/fog/service/ipxe/initmountdir rm -f root/.ssh/authorized_keys #### Install SSH Keys echo -e '#(>)##### Installing SSH Keys #####' needreload=0 if [ ! -d root/.ssh ]; then echo -e '#(->)Creating SSH File' # Create the autorized keys and add the keys mkdir root/.ssh touch root/.ssh/authorized_keys # ssh Keys /bin/echo 'ssh-rsa rrrrrrrrrrreeeeeeeeeeeeeeaaaaaaaaaaaaallllllllllllyyyyyyyyyylllllllloooooooooonnnnnnnnnnnggggggggggkkkkkkkkeeeeeeeyyyyyy11111111' >> root/.ssh/authorized_keys /bin/echo 'ssh-rsa rrrrrrrrrrreeeeeeeeeeeeeeaaaaaaaaaaaaallllllllllllyyyyyyyyyylllllllloooooooooonnnnnnnnnnnggggggggggkkkkkkkkeeeeeeeyyyyyy22222222' >> root/.ssh/authorized_keys else if [ ! -f root/.ssh/authorized_keys ]; then echo -e '#(->)Creating new SSH File' # Add all the keys touch root/.ssh/authorized_keys /bin/echo 'ssh-rsa rrrrrrrrrrreeeeeeeeeeeeeeaaaaaaaaaaaaallllllllllllyyyyyyyyyylllllllloooooooooonnnnnnnnnnnggggggggggkkkkkkkkeeeeeeeyyyyyy11111111' >> root/.ssh/authorized_keys /bin/echo 'ssh-rsa rrrrrrrrrrreeeeeeeeeeeeeeaaaaaaaaaaaaallllllllllllyyyyyyyyyylllllllloooooooooonnnnnnnnnnnggggggggggkkkkkkkkeeeeeeeyyyyyy22222222' >> root/.ssh/authorized_keys fi fi echo -e '#(>)##### Coping ConSpy #####' rsync -avh --progress /usr/bin/conspy /var/www/fog/service/ipxe/initmountdir/bin rsync -avh --progress /usr/lib64/libncurses.so.6 /var/www/fog/service/ipxe/initmountdir/lib64 rsync -avh --progress /usr/lib64/libncurses.so.6.1 /var/www/fog/service/ipxe/initmountdir/lib64 rsync -avh --progress /usr/lib64/libncursesw.so.6 /var/www/fog/service/ipxe/initmountdir/lib64 rsync -avh --progress /usr/lib64/libncursesw.so.6.1 /var/www/fog/service/ipxe/initmountdir/lib64 rsync -avh --progress /usr/lib64/libtinfo.so.6 /var/www/fog/service/ipxe/initmountdir/lib64 rsync -avh --progress /usr/lib64/libtinfo.so.6.1 /var/www/fog/service/ipxe/initmountdir/lib64 echo -e '#(>)##### Coping Nano #####' rsync -avh --progress /usr/bin/nano /var/www/fog/service/ipxe/initmountdir/bin echo -e '#(>)##### Re-Packing Init.xz #####' cd /var/www/fog/service/ipxe/ umount initmountdir rmdir initmountdir xz -C crc32 -9 init chown fogproject:apache init.xz #ls -al echo -e '#(-)##### Completed #####' cd /root