mirror of
https://github.com/PirateBox-Dev/PirateBoxScripts_Webserver.git
synced 2023-12-14 07:22:58 +01:00
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:
commit
6679b04cdb
7 changed files with 30 additions and 5 deletions
10
BuildScripts/timesave.service
Normal file
10
BuildScripts/timesave.service
Normal 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
|
|
@ -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
|
||||
|
|
2
Makefile
2
Makefile
|
@ -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 $@
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue