diff options
Diffstat (limited to 'config/lightsquid/lightsquid.inc')
-rw-r--r-- | config/lightsquid/lightsquid.inc | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/config/lightsquid/lightsquid.inc b/config/lightsquid/lightsquid.inc index 503e9cf3..60ec1fc9 100644 --- a/config/lightsquid/lightsquid.inc +++ b/config/lightsquid/lightsquid.inc @@ -63,7 +63,7 @@ define('LS_CONFIGPATH', LIGHTSQUID_BASE . '/etc/lightsquid'); define('LS_CONFIGFILE', 'lightsquid.cfg'); define('LS_CONFIGFILE_DIST', 'lightsquid.cfg.dist'); define('LS_WWWPATH', LIGHTSQUID_BASE . '/www/lightsquid'); -define('LS_TEMPLATEPATH', '/usr/local/www/lightsquid/tpl'); +define('LS_TEMPLATEPATH', LS_WWWPATH . '/tpl'); define('LS_LANGPATH', LIGHTSQUID_BASE . '/share/lightsquid/lang'); define('LS_REPORTPATH', '/var/lightsquid/report'); @@ -145,11 +145,21 @@ function lightsquid_install() { if (!is_dir('/usr/local/etc/lightsquid') && is_dir(LS_CONFIGPATH)) { symlink(LS_CONFIGPATH, '/usr/local/etc/lightsquid'); } - if (!is_dir('/usr/local/www/lightsquid') && is_dir(LS_WWWPATH)) { + + if (is_dir('/usr/local/www/lightsquid')) + $_gc = exec('rm -rf /usr/local/www/lightsquid'); + + if (is_dir(LS_WWWPATH)) { symlink(LS_WWWPATH, '/usr/local/www/lightsquid'); } } + foreach (array('novopf', 'novosea') as $tpl) { + if (file_exists(LS_TEMPLATEPATH . '/' . $tpl)) + $_gc = exec('rm -rf ' . LS_TEMPLATEPATH . '/' . $tpl); + symlink('/usr/local/share/lightsquid/tpl/' . $tpl, LS_TEMPLATEPATH . '/' . $tpl); + } + update_log("lightsquid_install: stopped"); } |