• Recent
  • Unsolved
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login
  • Recent
  • Unsolved
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login

Conspy Install Script

Scheduled Pinned Locked Moved
Tutorials
1
1
445
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G
    Greg Plamondon Testers
    last edited by Greg Plamondon Nov 12, 2020, 2:29 PM Nov 12, 2020, 8:26 PM

    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
    
    1 Reply Last reply Reply Quote 1
    • 1 / 1
    1 / 1
    • First post
      1/1
      Last post

    281

    Online

    12.0k

    Users

    17.3k

    Topics

    155.2k

    Posts
    Copyright © 2012-2024 FOG Project