diff options
Diffstat (limited to 'packages/dashboard/dashboard.inc')
-rw-r--r-- | packages/dashboard/dashboard.inc | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/packages/dashboard/dashboard.inc b/packages/dashboard/dashboard.inc new file mode 100644 index 00000000..fefb8e03 --- /dev/null +++ b/packages/dashboard/dashboard.inc @@ -0,0 +1,20 @@ +<?php + +function dashboard_install() { + global $g, $config; + if(!file_exists("/usr/local/www/index.php.before_dashboard")) { + /* backup the pre-dashboard index.php file */ + mwexec("cp /usr/local/www/index.php /usr/local/www/index.php.before_dashboard"); + } + mwexec("tar xzvpf -C /usr/local/www/ /usr/local/pkg/widgets.tgz"); +} + +function dashboard_deinstall() { + global $g, $config; + if(file_exists("/usr/local/www/index.php.before_dashboard")) { + /* restore the file prior to the dashboard package installation */ + mwexec("cp /usr/local/www/index.php.before_dashboard /usr/local/www/index.php"); + } +} + +?>
\ No newline at end of file |