8000 releastetrain by snaptec · Pull Request #33 · snaptec/openWB · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

releastetrain #33

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Nov 7, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions openwb.conf
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ nachtsoc=15
nachtsoc1=15
mindestuberschuss=1500
abschaltuberschuss=5
sofortll=32
sofortll=27
sofortlls1=32
sofortlls2=13
smaemdbezugid=1900123456
Expand Down Expand Up @@ -109,7 +109,7 @@ evsewifitimeoutlp2=1
evsewifiiplp1=10.20.0.98
evsewifitimeoutlp1=1
nachtladenabs1=18
sofortsoclp1=45
sofortsoclp1=65
sofortsoclp2=80
sofortsoclp3=
sofortsocstatlp1=1
Expand Down Expand Up @@ -167,4 +167,4 @@ speicherleistung_http='http://10.20.0.63/haus/ramdisk/battleistung'
soc_tesla_username=deine@email.com
soc_tesla_password=deinpasswort
soc_tesla_intervall=15

releasetrain=stable
7 changes: 6 additions & 1 deletion runs/atreboot.sh
Original file line number Diff line number Diff line change
Expand Up @@ -536,7 +536,10 @@ if ! grep -Fq "soc_tesla_intervall=" /var/www/html/openWB/openwb.conf
then
echo "soc_tesla_intervall=20" >> /var/www/html/openWB/openwb.conf
fi

if ! grep -Fq "releasetrain=" /var/www/html/openWB/openwb.conf
then
echo "releasetrain=stable" >> /var/www/html/openWB/openwb.conf
fi
if ! sudo grep -Fq "cronnightly.sh" /var/spool/cron/crontabs/pi
then
(crontab -l -u pi ; echo "1 0 * * * /var/www/html/openWB/runs/cronnightly.sh >> /var/log/openWB.log 2>&1")| crontab -u pi -
Expand All @@ -559,4 +562,6 @@ fi


sudo cp /usr/share/zoneinfo/Europe/Berlin /etc/localtime
uuid=$(uuid)
curl -d "update="$uuid"" -H "Content-Type: application/x-www-form-urlencoded" -X POST http://openwb.de/tools/update.php
sudo i2cdetect -y 1 | grep -o ' .. --' |grep -o '[0-9]*' > /var/www/html/openWB/ramdisk/i2csearch
3 changes: 2 additions & 1 deletion runs/update.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/bin/bash

cd /var/www/html/openWB
. /var/www/html/openWB/openwb.conf
cp modules/soc_i3/auth.json /tmp/auth.json
cp modules/soc_i3s1/auth.json /tmp/auth.json.1
cp openwb.conf /tmp/openwb.conf
Expand All @@ -10,7 +11,7 @@ cp web/logging/data/daily/* /tmp/data/daily
mkdir /tmp/data/monthly
cp web/logging/data/monthly/* /tmp/data/monthly
sudo git fetch origin
sudo git reset --hard origin/master
sudo git reset --hard origin/$releasetrain
cd /var/www/html/
sudo chown -R pi:pi openWB
sudo chown -R www-data:www-data /var/www/html/openWB/web/backup
Expand Down
10000
19 changes: 17 additions & 2 deletions web/misc.php
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,9 @@
if(strpos($line, "livegraph=") !== false) {
list(, $livegraphold) = explode("=", $line);
}

if(strpos($line, "releasetrain=") !== false) {
list(, $releasetrainold) = explode("=", $line);
}
}

$bezug_http_w_urlold = str_replace( "'", "", $bezug_http_w_urlold);
Expand Down Expand Up @@ -392,8 +394,21 @@
<option <?php if($livegraphold == 20) echo selected ?> value="20">20 Min</option>
<option <?php if($livegraphold == 30) echo selected ?> value="30">30 Min</option>
</select><br>

<br>
</div>
<div class="row">
<b><label for="releasetrain">Releasechannel:</label></b>
<select type="text" name="releasetrain" id="releasetrain">
<option <?php if($releasetrainold == "stable\n") echo selected ?>value="stable">Stable</option>
<option <?php if($releasetrainold == "beta\n") echo selected ?> value="beta">Beta</option>
<option <?php if($releasetrainold == "master\n") echo selected ?> value="master">Nightly</option>
</select>
<br>
</div>
<div class="row">
Der Stable train ist der empfohlene. Im Betazweig befinden sich die Änderungen für künftige Releases. Nightly ist der aktuelle Entwicklungszweig. Man kann grundsätzlich immer zwischen den Zweigen wechseln. Hierfür den gewünschten Zweig auswählen, Speichern und ein Update durchführen.<br><br>
</div>

<br><br>
<button type="submit" class="btn btn-primary btn-green">Save</button>
</form><br><br /><hr>
Expand Down
12 changes: 12 additions & 0 deletions web/tools/savemisc.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,18 @@
}
}
file_put_contents('/var/www/html/openWB/openwb.conf', $result);
$result = '';
$lines = file('/var/www/html/openWB/openwb.conf');
foreach($lines as $line) {
if(strpos($line, "releasetrain=") !== false) {
$result .= 'releasetrain='.$_POST[releasetrain]."\n";
}
else {
$result .= $line;
}
}
file_put_contents('/var/www/html/openWB/openwb.conf', $result);



}
3B5F Expand Down
0