Ranting about an R1200RT, motorcycle trips, information security and other day by day annoyances...
20141218
20141210
OMG, better sound on new iPad Mini!
I just found out that the sound quality on the new iPad Mini has increased dramatically! Research has shown that the additional speaker holes in the new iPad Mini makes a huge difference.
Old iPad Mini:
New iPad Mini:
Old iPad Mini:
New iPad Mini:
20141207
20141201
Pulse sync as a NAS4free service (with only encrypted volumes)
When you boot NAS4free from USB and your NAS4free host has only volumes that are encrypted, there is a small challenge to start the Pulse sync service. The encrypted storage is not available when NAS4free is started. First the encryption password must be entered in the NAS4free console.
Here we use a script that checks a couple of things. The script is executed through cron, the freeBSD scheduler. This is the flow of the script:
This is the script:
#!/bin/bash
SERVICE=pulse
PULSEFOLDER=/mnt/r5e/scripts/pulse
PULSE=$PULSEFOLDER/$SERVICE
CONFIG=$PULSEFOLDER/config
LOGFOLDER=$PULSEFOLDER/logs
LOG=$LOGFOLDER/pulse.log
pgrep $SERVICE
result=$?
echo "exit code: ${result}"
if [ "${result}" -eq "0" ] ; then
echo "`date`: $SERVICE service running, everything is fine"
exit 1
fi
if [ ! -f $PULSE ] ; then
echo "File $PULSE does not exist"
exit 2
fi
# --- Start pulse with alternative config folder...
export GOMAXPROCS=2
$PULSE -home $CONFIG >>$LOG &
Place the script in the bin folder, chmod +x {scriptname} and configure cron in the NAS4free console like this:
Now cron will periodically check (every 5 minutes) if NAS4free runs (if OK, exit), if the encrypted storage is available (if not, exit) and else start Pulse.
Happy syncing!
Here we use a script that checks a couple of things. The script is executed through cron, the freeBSD scheduler. This is the flow of the script:
This is the script:
#!/bin/bash
SERVICE=pulse
PULSEFOLDER=/mnt/r5e/scripts/pulse
PULSE=$PULSEFOLDER/$SERVICE
CONFIG=$PULSEFOLDER/config
LOGFOLDER=$PULSEFOLDER/logs
LOG=$LOGFOLDER/pulse.log
pgrep $SERVICE
result=$?
echo "exit code: ${result}"
if [ "${result}" -eq "0" ] ; then
echo "`date`: $SERVICE service running, everything is fine"
exit 1
fi
if [ ! -f $PULSE ] ; then
echo "File $PULSE does not exist"
exit 2
fi
# --- Start pulse with alternative config folder...
export GOMAXPROCS=2
$PULSE -home $CONFIG >>$LOG &
Place the script in the bin folder, chmod +x {scriptname} and configure cron in the NAS4free console like this:
Now cron will periodically check (every 5 minutes) if NAS4free runs (if OK, exit), if the encrypted storage is available (if not, exit) and else start Pulse.
Happy syncing!
20141129
Pulse sync as a NAS4free service
Pulse sync is an Open Source cluster synchronization client.It provides peer-to-peer synchronization with Digtal Certificate based node authentication, compression and transport encryption. In other words, cloud synchronization without a (third party) cloud. There is client software for Windows, Mac, Linux, BSD, and Solaris.
NAS4Free is an embedded Open Source NAS distribution based on FreeBSD. It can be installed on an run from a USB memory stick. One appealing NAS4free feature is the use of encryption for its volumes.
Since there is an x64 BSD Pulse binary, it should be possible to run on NAS4free.
/mnt/disk0/pulse
/mnt/disk0/pulse/bin
/mnt/disk0/pulse/logs
/mnt/disk0/pulse/config
/mnt/disk0/sync
Copy the Pulse binary to the bin folder and chmod +x pulse.
/mnt/disk0/pulse/bin/pulse -home=/mnt/disk0/pulse/config
You will get a screen like this:
Stop pulse with Ctrl+C.
..
<gui enabled="true" tls="false">
<address>0.0.0.0:8081</address>
</gui>
..
Since you are editing the config file anyway, also change the folder where the synced files are stored:
..
<folder id="default" path="/mnt/disk0/sync" ro="false" rescanIntervalS="60" ignorePerms="false">
..
You should get a screen like this:
Now you are good to go. A couple of things are left.
/mnt/disk0/pulse/bin/pulse -home=/mnt/disk0/pulse/config >>/mnt/disk0/pulse/logs/pulse.log &
To check you Pulse NAS4free config reboot the NAS4free server and issue the pgrep pulse command. You should see 2 PIDs:
nas4free: pulse # pgrep pulse
2444
2436
Now you can configure all the other Pulse settings through the Pulse web interface.
Happy syncing!
NAS4Free is an embedded Open Source NAS distribution based on FreeBSD. It can be installed on an run from a USB memory stick. One appealing NAS4free feature is the use of encryption for its volumes.
Since there is an x64 BSD Pulse binary, it should be possible to run on NAS4free.
Copy Pulse binary to NAS4free
NAS4free volumes mounted on /mnt, in this case /mnt/disk0. Create a couple of folders there:/mnt/disk0/pulse
/mnt/disk0/pulse/bin
/mnt/disk0/pulse/logs
/mnt/disk0/pulse/config
/mnt/disk0/sync
Copy the Pulse binary to the bin folder and chmod +x pulse.
Start Pulse manually
The Pulse configuration and certificates are created after the first start of Pulse. Start Pulse:/mnt/disk0/pulse/bin/pulse -home=/mnt/disk0/pulse/config
You will get a screen like this:
Stop pulse with Ctrl+C.
Configure pulse for NAS4free
The NAS4free webserver runs per default on port 8080 and so does the Pulse webserver. To prevent conflicts change the next line in config.xml:..
<gui enabled="true" tls="false">
<address>0.0.0.0:8081</address>
</gui>
..
Since you are editing the config file anyway, also change the folder where the synced files are stored:
..
<folder id="default" path="/mnt/disk0/sync" ro="false" rescanIntervalS="60" ignorePerms="false">
..
Check the Pulse webserver
Start Pulse again and browse to http://{IP address of NAS4free}:8081You should get a screen like this:
Now you are good to go. A couple of things are left.
Automate the startup of Pulse
NAS4free has a method to issue commands to start up processes like Pulse. Go to Systems > Advanced > Command Scripts. Add the next command with "PostInit" selected:/mnt/disk0/pulse/bin/pulse -home=/mnt/disk0/pulse/config >>/mnt/disk0/pulse/logs/pulse.log &
To check you Pulse NAS4free config reboot the NAS4free server and issue the pgrep pulse command. You should see 2 PIDs:
nas4free: pulse # pgrep pulse
2444
2436
Now you can configure all the other Pulse settings through the Pulse web interface.
Protect access to the Pulse website
To prevent unauthenticated and unsecured access to the NAS4free Pulse website you can set a username/password and tick the "Use HTTPS for GUI" box:Happy syncing!
Subscribe to:
Posts
(
Atom
)








