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 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 === === 1.1.0 ===
* [New] Enable / Disable file provisioning for custom lighttpd directory listing * [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: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: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: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): $(OPENWRT_BIN_FOLDER):
mkdir -p $@ mkdir -p $@

View file

@ -1,4 +1,6 @@
# PirateBoxScripts with Modifications for running in a Webserver # 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 © 2012-2014 [Matthias Strubel](mailto:matthias.strubel@aod-rpg.de) licenced under GPL-3
## Maintainers ## Maintainers

View file

@ -8,12 +8,13 @@
# gives a sort of stability to complete standalone # gives a sort of stability to complete standalone
# systems. # systems.
# #
# Licenced under GPL-3 @ 2012-2014 # Licenced under GPL-3 @ 2012,2015
# Matthias Strubel matthias.strubel@aod-rgp.de # Matthias Strubel matthias.strubel@aod-rgp.de
##function for similar saving & getting time ##function for similar saving & getting time
get_datetime() { 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 [ "$2" = "recover" ] ; then
if [ `get_datetime` -lt `cat $TIMESAVE` ] ; then if [ `get_datetime` -lt `cat $TIMESAVE` ] ; then
date `cat $TIMESAVE ` date -s `cat $TIMESAVE `
[ "$?" != "0" ] && echo "error in recovering time" && exit 255 [ "$?" != "0" ] && echo "error in recovering time" && exit 255
echo "Time recovered" echo "Time recovered"
exit 0 exit 0

View file

@ -115,6 +115,11 @@ NODE_CONFIG="$PIRATEBOX_FOLDER/conf/node.conf"
## Timesave file for non-RTC devices ## Timesave file for non-RTC devices
TIMESAVE="$PIRATEBOX_FOLDER/share/timesave_file" 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? #Start droopy? - Enable upload?
DROOPY_ENABLED="no" DROOPY_ENABLED="no"
#Image-SRC #Image-SRC

View file

@ -162,8 +162,7 @@ case "$1" in
DROOPY_USER=" -c $LIGHTTPD_USER:$LIGHTTPD_GROUP " DROOPY_USER=" -c $LIGHTTPD_USER:$LIGHTTPD_GROUP "
fi fi
log_daemon_msg "Starting droopy..." 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 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
$DROOPY_PORT
log_end_msg $? log_end_msg $?
fi fi