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