Insync en Raspian desde línea de comando

Instalación

Lo primero que debemos hacer es averiguar si nuestra Rasberry es armhf o armel. Para ello ejecutamos el siguiente comando:

pi@burropi:~ $ readelf -A /proc/self/exe | grep Tag_ABI_VFP_args
 Tag_ABI_VFP_args: VFP registers
pi@burropi:~ $

Si la salida del comando es como arriba entonces tenemos armhf. De lo contrario es armel.

Descargamos la version del cliente de Insync adecuada para nuestro sistema:

https://www.insynchq.com/downloads

Desempaquetamos y movemos el cliente a su destino final:

tar -xjf insync-armhf_1.3.6.36076_i386.tar.bz2

sudo mv insync-portable/ /opt

Creamos el script de arranque:

vi /etc/init.d/insync-portable

Con el siguiente contenido:

#! /bin/sh
# /etc/init.d/insync-portable

### BEGIN INIT INFO
# Provides: insync-portable
# Required-Start: $remote_fs $syslog $all
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Simple script to start insync-portable
# Description: Will change directory, initialise insync-portable as your user, the change directory back for booting.
### END INIT INFO

# If you want a command to always run, put it here
INSYNC_PATH=/opt/insync-portable

# Carry out specific functions when asked to by the system
case "$1" in
 start)
 echo "Starting Insync"
 cd $INSYNC_PATH
 sudo -u pi ./insync-portable start
 ;;
 stop)
 echo "Stopping Insync"
 cd $INSYNC_PATH
 sudo -u pi ./insync-portable quit
 ;;
 *)
 echo "Usage: /etc/init.d/insync-portable start|stop"
 exit 1
 ;;
esac
exit 0

Lo añadimos para que se inicie con la Raspberry Pi:

sudo chmod +x /etc/init.d/insync-portable

sudo update-rc.d insync-portable defaults

Y lo arrancamos:

service insync-portable start

Añadir cuenta

El comando para añadir una cuenta es:

./insync-portable add_account -a "CÓDIGO_AUTORIZACIÓN" -p "RUTA"

Donde:

  • Código de autorización: es un código mediante el cual Google autoriza a Insync a acceder a tus archivos en Drive. Se obtiene en la siguiente URL: https://goo.gl/jv797S
  • Ruta: Directorio de la Raspberry Pi para sincronizar con Drive.

Bibliografía: Insync

2 comentarios en “Insync en Raspian desde línea de comando

  1. Hola,
    No me funciona, e seguido todos tus pasos, he hecho un » service insync-portable status» y me dice que esta bien y funcionando correctamente.
    ¿Me podrías decir alguna solución que sepas?
    Gracias,

Deja un comentario