mirror of
https://github.com/PirateBox-Dev/PirateBoxScripts_Webserver.git
synced 2026-12-05 08:48:41 +00:00
shoutbox_stuff.sh : Remove legacy piratebox.conf path and add quote vars
This commit is contained in:
1 parent
102238f8cc
commit
19e4c4e911
3 files changed
+20
-19
No files matched your search
@@ -3,28 +3,28 @@
|
||||
# Matthias Strubel - (c)2012-2014 with GPL-3
|
||||
#
|
||||
# Only calls generate-Routing in piratebox-folder
|
||||
# gets Piratebox-Folder into www
|
||||
# gets Piratebox-Folder into www
|
||||
|
||||
|
||||
# $1 www folder
|
||||
# $2 pirtatebox config file
|
||||
|
||||
|
||||
. $2
|
||||
|
||||
|
||||
cd $PIRATEBOX_FOLDER
|
||||
. /opt/piratebox/conf/piratebox.conf
|
||||
|
||||
|
||||
cd "$PIRATEBOX_FOLDER"
|
||||
cd python_lib
|
||||
|
||||
export SHOUTBOX_CHATFILE=$CHATFILE
|
||||
export SHOUTBOX_GEN_HTMLFILE=$GEN_CHATFILE
|
||||
export SHOUTBOX_CLIENT_TIMESTAMP=$SHOUTBOX_CLIENT_TIMESTAMP
|
||||
export SHOUTBOX_CHATFILE="$CHATFILE"
|
||||
export SHOUTBOX_GEN_HTMLFILE="$GEN_CHATFILE"
|
||||
export SHOUTBOX_CLIENT_TIMESTAMP="$SHOUTBOX_CLIENT_TIMESTAMP"
|
||||
|
||||
export DISK_GEN_HTMLFILE=$GEN_DISKFILE
|
||||
|
||||
#Writing init-message and reset chat..
|
||||
if [ "$RESET_CHAT" = "yes" ] ; then
|
||||
cat $PIRATEBOX_FOLDER/conf/chat_init.txt > $CHATFILE
|
||||
cat "$PIRATEBOX_FOLDER/conf/chat_init.txt" > "$CHATFILE"
|
||||
fi
|
||||
|
||||
#Generate content file for Shoutbox
|
||||
@@ -33,21 +33,22 @@ python psogen.py generate
|
||||
if [ "$SHOUTBOX_ENABLED" = "no" ] ; then
|
||||
# If the shoutbox is disabled, we remove the writable flag
|
||||
echo -n "Making shoutbox readonly..."
|
||||
chmod a-w $CHATFILE
|
||||
chmod a-w "$CHATFILE"
|
||||
echo "done"
|
||||
fi
|
||||
|
||||
#Generate content file for DiskUsage
|
||||
rm "$DISK_GEN_HTMLFILE"
|
||||
python diskusage.py generate
|
||||
|
||||
$( sleep 20 && touch $GEN_CHATFILE ) &
|
||||
$( sleep 20 && touch "$GEN_CHATFILE" ) &
|
||||
|
||||
#Set correct permissions
|
||||
chown $LIGHTTPD_USER:$LIGHTTPD_GROUP $SHOUTBOX_CHATFILE
|
||||
chown $LIGHTTPD_USER:$LIGHTTPD_GROUP $SHOUTBOX_GEN_HTMLFILE
|
||||
chmod ug+rw $SHOUTBOX_CHATFILE
|
||||
chmod ug+rw $SHOUTBOX_GEN_HTMLFILE
|
||||
chown "$LIGHTTPD_USER":"$LIGHTTPD_GROUP" "$SHOUTBOX_CHATFILE"
|
||||
chown "$LIGHTTPD_USER":"$LIGHTTPD_GROUP" "$SHOUTBOX_GEN_HTMLFILE"
|
||||
chmod ug+rw "$SHOUTBOX_CHATFILE"
|
||||
chmod ug+rw "$SHOUTBOX_GEN_HTMLFILE"
|
||||
|
||||
#DiskUsage correct permissions
|
||||
chown $LIGHTTPD_USER:$LIGHTTPD_GROUP $DISK_GEN_HTMLFILE
|
||||
chmod ug+rw $DISK_GEN_HTMLFILE
|
||||
chown "$LIGHTTPD_USER":"$LIGHTTPD_GROUP" "$DISK_GEN_HTMLFILE"
|
||||
chmod ug+rw "$DISK_GEN_HTMLFILE"
|
||||
@@ -183,7 +183,7 @@ case "$1" in
|
||||
fi
|
||||
|
||||
#Do shoutbox stuff
|
||||
$PIRATEBOX/bin/shoutbox_stuff.sh $WWW_FOLDER $CONF
|
||||
$PIRATEBOX/bin/shoutbox_stuff.sh
|
||||
|
||||
|
||||
#Start here the lighttpd i.e.
|
||||
|
||||
@@ -177,7 +177,7 @@ case "$1" in
|
||||
fi
|
||||
|
||||
#Do shoutbox stuff
|
||||
$PIRATEBOX/bin/shoutbox_stuff.sh $WWW_FOLDER $CONF
|
||||
$PIRATEBOX/bin/shoutbox_stuff.sh
|
||||
|
||||
|
||||
#Start here the lighttpd i.e.
|
||||
|
||||
Reference in new issue
Block a user