wok annotate turbine/stuff/turbine @ rev 22147
updated xalan-c and xalan-c-dev (1.10.0 -> 1.11)
author | Hans-G?nter Theisgen |
---|---|
date | Wed Nov 06 16:26:14 2019 +0100 (2019-11-06) |
parents | 02c70d036ea0 |
children |
rev | line source |
---|---|
hackdorte@20046 | 1 #!/bin/bash |
hackdorte@20046 | 2 # |
hackdorte@20046 | 3 # Provided By The SliTaz Development Team. |
hackdorte@20046 | 4 # Copyright (C) 2017 The SliTaz Association. |
hackdorte@20046 | 5 # |
hackdorte@20046 | 6 # This program is free software: you can redistribute it and/or modify |
hackdorte@20046 | 7 # it under the terms of the GNU General Public License as published by |
hackdorte@20046 | 8 # the Free Software Foundation, either version 3 of the License, or |
hackdorte@20046 | 9 # (at your option) any later version. |
hackdorte@20046 | 10 # |
hackdorte@20046 | 11 # This program is distributed in the hope that it will be useful, |
hackdorte@20046 | 12 # but WITHOUT ANY WARRANTY; without even the implied warranty of |
hackdorte@20046 | 13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
hackdorte@20046 | 14 # GNU General Public License for more details. |
hackdorte@20046 | 15 # |
hackdorte@20046 | 16 # You should have received a copy of the GNU General Public License |
hackdorte@20046 | 17 # along with this program. If not, see <http://www.gnu.org/licenses/>. |
hackdorte@20046 | 18 # |
hackdorte@20046 | 19 # Import Turbine Database. |
hackdorte@20046 | 20 source /var/www/cgi-bin/turbine/res/base/data |
hackdorte@20046 | 21 |
hackdorte@20046 | 22 export turbine="/usr/bin/turbine" |
hackdorte@20046 | 23 |
hackdorte@20046 | 24 # Check DEPENDS |
hackdorte@20046 | 25 # ------------- |
hackdorte@20046 | 26 CHK_BASH="/var/lib/tazpkg/installed/bash" # Check Bash |
hackdorte@20046 | 27 CHK_YAD="/var/lib/tazpkg/installed/yad-gtk2-html" # Check Yad with HTML. |
hackdorte@20046 | 28 CHK_SVG="/var/lib/tazpkg/installed/librsvg" # Check Librsvg. |
hackdorte@20046 | 29 CHK_FAIL="file:///$localdata/base/deps.fail.html" # Report missing DEPS. |
hackdorte@20046 | 30 |
hackdorte@20046 | 31 # ---------------------------------------------------------------------------- |
hackdorte@20046 | 32 # It is important to check if any dependencies have been removed by user. |
hackdorte@20046 | 33 |
hackdorte@20046 | 34 checkDEPS(){ |
hackdorte@20046 | 35 if [ -e "$CHK_BASH" ] && [ -e "$CHK_YAD" ] && [ -e "$CHK_SVG" ] |
hackdorte@20046 | 36 then |
hackdorte@20047 | 37 # OK! Let's check the root now... |
hackdorte@20046 | 38 checkROOT |
hackdorte@20046 | 39 else |
hackdorte@20046 | 40 # Oops! Let's report the problem in the default browser. |
hackdorte@20046 | 41 browser $CHK_FAIL |
hackdorte@20046 | 42 exit |
hackdorte@20046 | 43 fi |
hackdorte@20046 | 44 } |
hackdorte@20046 | 45 |
hackdorte@20046 | 46 # Check Root |
hackdorte@20046 | 47 # ---------- |
hackdorte@20046 | 48 |
hackdorte@20046 | 49 checkROOT(){ |
hackdorte@20046 | 50 |
hackdorte@20046 | 51 user=$(id -u) |
al@20904 | 52 if [ "$user" -eq 0 ] |
hackdorte@20046 | 53 then |
hackdorte@20046 | 54 turbine |
hackdorte@20046 | 55 else |
hackdorte@20046 | 56 tazbox su turbine |
hackdorte@20046 | 57 fi |
hackdorte@20046 | 58 |
hackdorte@20046 | 59 exit |
hackdorte@20046 | 60 |
hackdorte@20046 | 61 } |
hackdorte@20046 | 62 |
hackdorte@20046 | 63 # Start Turbine |
hackdorte@20046 | 64 # ------------- |
hackdorte@20046 | 65 |
hackdorte@20046 | 66 turbine(){ |
hackdorte@20046 | 67 |
hackdorte@20046 | 68 yad --gtkrc="$localtheme/gtkrc" --undecorated \ |
hackdorte@20046 | 69 --window-icon="$localicons/48/turbine.svg" \ |
hackdorte@20046 | 70 --title="$APP_TITLE - $APP_DESC" --center \ |
hackdorte@20046 | 71 --width="760" --height="520" --no-buttons \ |
hackdorte@20046 | 72 --browser --html --mime="text/html" \ |
hackdorte@20046 | 73 --borders="0" --uri="$localwww/res/base/status.cgi" |
hackdorte@20046 | 74 |
hackdorte@20046 | 75 } |
hackdorte@20046 | 76 |
hackdorte@20046 | 77 checkDEPS |