Showing posts with label xpenology. Show all posts
Showing posts with label xpenology. Show all posts

Sunday, February 26, 2017

Installing Entware onto Synology DSM6

You might run into the situation where you need to install an external package onto your DSM6. Entware is the way to go as a ton of packages are available. The steps to do are well listed here. Make sure you're root (sudo su -) before executing them.

Usage as per below:

# opkg update
Downloading http://pkg.entware.net/binaries/mipsel/Packages.gz.
Updated list of available packages in /opt/var/opkg-lists/entware-ng.

# opkg list transmission*
transmission-cli - 2.84-4 - CLI utilities for transmission.
transmission-daemon - 2.84-4 - Transmission is a simple BitTorrent client.
It features a very simple, intuitive interface
on top on an efficient, cross-platform back-end.
This package contains the daemon itself.
transmission-remote - 2.84-4 - CLI remote interface for transmission.
transmission-web - 2.84-4 - Webinterface resources for transmission.

# opkg install transmission-web
Installing transmission-web (2.84-4) to root...
Downloading http://pkg.entware.net/binaries/mipsel/transmission-web_2.84-4_mipselsf.ipk.
Installing transmission-daemon (2.84-4) to root...
Downloading http://pkg.entware.net/binaries/mipsel/transmission-daemon_2.84-4_mipselsf.ipk.
...

Tuesday, February 14, 2017

Installing Crashplan docker image to Xpenology or Synology

Following the excellent tutorial by Mike Tabor, the only difference to my setup, was the need to change my local config for this location: C:\Users\username\AppData\Local\CrashPlan\.ui_info instead of the mentioned one.


Monday, March 2, 2015

Synology default shell does not support regex

I was trying to write a script today that would parse a file and check if a line matches a regex. It would fail for unknown reasons, until I found out that the default shell within a Synology (ash), does not support this. Installing bash with ipkg solves this.

Script (not working in ash):
#!/bin/sh

FILENAME="status.txt"
LINENUM=0
REGEX="^(CLIENT_LIST)(.+)"

while read SINGLELINE
do
 LINENUM=$((LINENUM+1))

  if [[ $SINGLELINE =~ $REGEX ]]; then
  NUM_CLIENT=$((NUM_CLIENT+1))
  echo "Match CLIENT_LIST: $LINENUM"
 else
  echo "No match: $LINENUM"
 fi

done < "$FILENAME"

In my terminal:
$ ./status.sh
sh: 2.3.6: unknown operand

Script (working under bash):
#!/opt/bin/bash

FILENAME="status.txt"
LINENUM=0
REGEX="^(CLIENT_LIST)(.+)"

while read SINGLELINE
do
 LINENUM=$((LINENUM+1))

 if [[ $SINGLELINE =~ $REGEX ]]; then
  NUM_CLIENT=$((NUM_CLIENT+1))
  echo "Match CLIENT_LIST: $LINENUM"
 else
  echo "No match: $LINENUM"
 fi
done < "$FILENAME"

In my terminal:
$ ./status.sh
./status.sh
No match: 1
No match: 2
No match: 3
Match CLIENT_LIST: 4
No match: 5
No match: 6
No match: 7

Tip from: http://forum.synology.com/enu/viewtopic.php?f=27&t=77899