Skip to content

Instantly share code, notes, and snippets.

@jeffmaxton
Forked from Phlogi/CrashPlan_remote.sh
Created May 23, 2016 06:30
Show Gist options
  • Select an option

  • Save jeffmaxton/f1a1cc1845156532b10d193b9b6ae0c5 to your computer and use it in GitHub Desktop.

Select an option

Save jeffmaxton/f1a1cc1845156532b10d193b9b6ae0c5 to your computer and use it in GitHub Desktop.

Revisions

  1. @Phlogi Phlogi revised this gist Oct 2, 2015. 1 changed file with 4 additions and 2 deletions.
    6 changes: 4 additions & 2 deletions CrashPlan_remote.sh
    Original file line number Diff line number Diff line change
    @@ -1,10 +1,12 @@
    # change to your setup
    # requirements:
    #!/bin/sh
    # Adapt the two first variables to your environment
    # Requirements:
    # -the user below can connect to the IP without password (copy ssh key)
    # changes on server: ...share/crashplan/conf/my.service.xml:
    # <serviceUIConfig>
    # <serviceHost>0.0.0.0</serviceHost>
    #

    CPSSHUSER='root'
    CPHOST='192.168.1.214'

  2. @Phlogi Phlogi revised this gist Oct 2, 2015. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions CrashPlan_remote.sh
    Original file line number Diff line number Diff line change
    @@ -2,8 +2,8 @@
    # requirements:
    # -the user below can connect to the IP without password (copy ssh key)
    # changes on server: ...share/crashplan/conf/my.service.xml:
    <serviceUIConfig>
    <serviceHost>0.0.0.0</serviceHost>
    # <serviceUIConfig>
    # <serviceHost>0.0.0.0</serviceHost>
    #
    CPSSHUSER='root'
    CPHOST='192.168.1.214'
  3. @Phlogi Phlogi renamed this gist Oct 2, 2015. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  4. @Phlogi Phlogi created this gist Oct 2, 2015.
    43 changes: 43 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,43 @@
    # change to your setup
    # requirements:
    # -the user below can connect to the IP without password (copy ssh key)
    # changes on server: ...share/crashplan/conf/my.service.xml:
    <serviceUIConfig>
    <serviceHost>0.0.0.0</serviceHost>
    #
    CPSSHUSER='root'
    CPHOST='192.168.1.214'

    cd /Library/Application\ Support/CrashPlan/

    rm -f .ui_info

    scp $CPSSHUSER@$CPHOST:/var/lib/crashplan/.ui_info ./.ui_info

    #CPPORT=`cat .ui_info | cut -d ',' -f 1`

    echo "current port: $CPPORT on $CPHOST"

    WRONGIP=`cat .ui_info | cut -d ',' -f 3`


    #sed -i .ui_info "s/$CPPORT/4200/g" .ui_info

    sed -i .ui_info "s/$WRONGIP/$CPHOST/g" .ui_info

    #ssh -f -L 4200:127.0.0.1:$CPPORT $CPSSHUSER@$CPHOST -N

    open -W -a CrashPlan.app

    #kill $(ps -A | grep 'ssh -f -L 4200:127.0.0.1' | grep -v grep | awk '{print $1}')

    #rm -f .ui_info
    #mv .ui_info_bak .ui_info

    exit