Merge branch 'hotfix-1.0.5' into development

[New] Improved styling for droopy iframe.  (not applied)
    [New] Timesave script service file to run set the time during startup.
    [Fix] Droopy call in init.d/piratebox failed to use the correct port.
    [Fix] Timesave script behaviour fixed on full Linux systems. OpenWrt's date format is now customized during build & piratebox.conf .
This commit is contained in:
Matthias Strubel 2015-09-13 11:34:15 +02:00
commit 6679b04cdb
7 changed files with 30 additions and 5 deletions

View File

@ -0,0 +1,10 @@
[Unit]
Description=PirateBox timesave service
[Service]
Type=oneshot
ExecStart=/opt/piratebox/bin/timesave.sh /opt/piratebox/conf/piratebox.conf recover
TimeoutSec=20
[Install]
WantedBy=multi-user.target

View File

@ -1,5 +1,11 @@
CHANGELOG
=== 1.0.5 ===
* [New] Improved styling for droopy iframe.
* [New] Timesave script service file to run set the time during startup.
* [Fix] Droopy call in init.d/piratebox failed to use the correct port.
* [Fix] Timesave script behaviour fixed on full Linux systems.
* OpenWrt's date format is now customized during build & piratebox.conf .
=== 1.1.0 ===
* [New] Enable / Disable file provisioning for custom lighttpd directory listing

View File

@ -65,6 +65,8 @@ $(OPENWRT_CONFIG_FOLDER):
sed 's:192.168.77:192.168.1:g' -i $@/piratebox.conf
sed 's:DROOPY_USE_USER="yes":DROOPY_USE_USER="no":' -i $@/piratebox.conf
sed 's:LEASE_FILE_LOCATION=$$PIRATEBOX_FOLDER/tmp/lease.file:LEASE_FILE_LOCATION=/tmp/lease.file:' -i $@/piratebox.conf
sed 's:TIMESAVE_FORMAT="":TIMESAVE_FORMAT="+%C%g%m%d%H%M":' -i $@/piratebox.conf
$(OPENWRT_BIN_FOLDER):
mkdir -p $@

View File

@ -1,4 +1,6 @@
# PirateBoxScripts with Modifications for running in a Webserver
[![Join the chat at https://gitter.im/PirateBox-Dev/PirateBoxScripts_Webserver](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/PirateBox-Dev/PirateBoxScripts_Webserver?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
© 2012-2014 [Matthias Strubel](mailto:matthias.strubel@aod-rpg.de) licenced under GPL-3
## Maintainers

View File

@ -8,12 +8,13 @@
# gives a sort of stability to complete standalone
# systems.
#
# Licenced under GPL-3 @ 2012-2014
# Licenced under GPL-3 @ 2012,2015
# Matthias Strubel matthias.strubel@aod-rgp.de
##function for similar saving & getting time
get_datetime() {
date +%C%g%m%d%H%M
# Get format from piratebox.conf
date $TIMESAVE_FORMAT
}
@ -66,7 +67,7 @@ fi
if [ "$2" = "recover" ] ; then
if [ `get_datetime` -lt `cat $TIMESAVE` ] ; then
date `cat $TIMESAVE `
date -s `cat $TIMESAVE `
[ "$?" != "0" ] && echo "error in recovering time" && exit 255
echo "Time recovered"
exit 0

View File

@ -115,6 +115,11 @@ NODE_CONFIG="$PIRATEBOX_FOLDER/conf/node.conf"
## Timesave file for non-RTC devices
TIMESAVE="$PIRATEBOX_FOLDER/share/timesave_file"
#On non OpenWRT you can use the default output format
# as an input format. For OpenWrt you need to specify +%C%g%m%d%H%M
# The content is exchanged during makefile processing and image build
TIMESAVE_FORMAT=""
#Start droopy? - Enable upload?
DROOPY_ENABLED="no"
#Image-SRC

View File

@ -162,8 +162,7 @@ case "$1" in
DROOPY_USER=" -c $LIGHTTPD_USER:$LIGHTTPD_GROUP "
fi
log_daemon_msg "Starting droopy..."
start-stop-daemon $DROOPY_USER -m --start --background --pidfile $PIDFILE_DROOPY --exec $PIRATEBOX/bin/droopy -- -d "$UPLOADFOLDER" -m "$DROOPY_TXT" --chmod $DROOPY_CHMOD $DROOPY_USERDIR
$DROOPY_PORT
start-stop-daemon $DROOPY_USER -m --start --background --pidfile $PIDFILE_DROOPY --exec $PIRATEBOX/bin/droopy -- -d "$UPLOADFOLDER" -m "$DROOPY_TXT" --chmod $DROOPY_CHMOD $DROOPY_USERDIR $DROOPY_PORT
log_end_msg $?
fi