Well, I’ve been moving stuff to my archive NAS, and in case anyone is wondering – the DS213+ actually nearly gets to the 1GE transmission limit… It’s near the CPU limit then anyhow, but … 🙂
My VPN provider isn’t being supported by the Synology VPN client (because they aren’t using the standard port 1194, instead 1195). After tinkering with the ovpn files the Synology VPN client uses to store the connection settings (and failing), I just installed openvpn with ipkg.
However after tinkering around with the init-script provided by the openvpn ipkg from the NSLU2 feed, I got tired and just rewrote the damn thing:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 |
#!/bin/sh case $1 in start) # Enable ipv4_forwarding echo 1 > /proc/sys/net/ipv4/ip_forward # Create the necessary file structure for /dev/net/tun if ( [ ! -c /dev/net/tun ] ); then if ( [ ! -d /dev/net ] ); then mkdir -m 755 /dev/net fi mknod /dev/net/tun c 10 200 fi # Load the tun module if not already loaded if ( !(lsmod | grep -q "^tun") ); then insmod /lib/modules/tun.ko fi # Start the openvpn service /opt/sbin/openvpn --daemon --cd /opt/etc/openvpn --config openvpn.conf --writepid /var/run/openvpn.pid echo "Started Optware openvpn-client" ;; stop) # Kill the openvpn service if [ -f /var/run/openvpn.pid ] ; then # Compare the pidfile and the current pid [ "`cat /var/run/openvpn.pid`" == "`pidof openvpn`" ] && kill -TERM `pidof openvpn` else echo "Stopping Optware openvpn-client: No pidfile found" fi # Unload the tun module if ( (lsmod | grep -q "^tun") ); then rmmod -f tun fi echo "Stopping Optware openvpn-client" ;; status) # Check the status if [ -f /var/run/openvpn.pid ] ; then [ "`cat /var/run/openvpn.pid`" == "`pidof openvpn`" ] && echo "openvpn-client is running" else echo "openvpn-client is stopped" fi ;; reload) if [ -f /var/run/openvpn.pid ] ; then [ "`cat /var/run/openvpn.pid`" == "`pidof openvpn`" ] && kill -HUP `pidof openvpn` echo "Reloading Optware openvpn-client" fi ;; restart) $0 stop sleep 4 $0 start ;; esac |
Place the file in /opt/etc/init.d/S20openvpn, and the client daemon will start on boot.
Well, the title pretty much says what I want to do. Even if the DS213+ is on top of a living room cupboard, it’s still way to bright .. as I don’t need really need the LED, here’s a quick hack (the ID and the device is taken from the Synology Wiki) on how to disable it on each startup:
1 2 3 4 5 6 7 8 |
#!/bin/sh case $1 in start) echo "Disabling Power LED" echo 6 > /dev/ttyS1 ;; esac |
Just place the file in /opt/etc/init.d/S01leds and the script is gonna turn the LED off during a boot/reboot.