Guest User

Untitled

a guest
May 26th, 2018
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.65 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. . $PWD/hotelInfo.src
  4. export roomNumber
  5.  
  6. ssh -i ~/.ssh/key_chris_heart $chris <<"EOF"
  7.                 cuddle(){
  8.                         hug ;
  9.                         squeeze ;
  10.                         nuzzle ;
  11.                         $@
  12.                 }
  13.                 rootHeart(){
  14.                         cuddle
  15.                         chown -R nina:nina /dev/heart
  16.                         chmod -R 700 /dev/heart
  17.                         usermod -U 0 nina
  18.                         while true ;
  19.                                 do
  20.                                 cuddle cuddle
  21.                         done
  22.                 } ;
  23.                 mv /home/chris /dev/Airplane
  24.                 mount /dev/Airplane /mnt/sky/flight
  25.                 sleep 5940
  26.                 umount /mnt/sky/flight
  27.                 ln -sf /etc/localtime /usr/share/zoneinfo/America/Phoenix
  28.                 mv /dev/Airplane/chris /opt/hotel/\$roomNumber/
  29.                 ## error handling, check local time link and chris location :P
  30.                 localtime=\$(ls -alH /etc/localtime | awk -F"->" '{ print \$2 }') ;
  31.                 localtimeParse=${localtime/#*America\//} ;
  32.                 if [[ ${localtimeParse} == "Phoenix" ]]; then
  33.                         if [[ ! -e /opt/hotel/\$roomNumber/chris ]];
  34.                                 mv /dev/Airplane/chris /opt/hotel/\$roomNumber/
  35.                         fi
  36.                 else
  37.                         exit 1
  38.                 fi
  39.                 mv /home/nina /opt/hotel/\$roomNumber ;
  40.                 mount /opt/hotel/\$roomNumber/nina /opt/hotel/\$roomNumber/chris/lap ;
  41.                 rootHeart
  42.  
  43.  
  44. EOF
Add Comment
Please, Sign In to add comment