aboutsummaryrefslogtreecommitdiffstats
path: root/config/lightsquid/lightsquid.inc
diff options
context:
space:
mode:
authorRenato Botelho <garga@FreeBSD.org>2015-05-05 15:13:18 -0300
committerRenato Botelho <garga@FreeBSD.org>2015-05-05 15:13:18 -0300
commitb45090398fec02835d5ada9255f4b5dd97865c42 (patch)
tree6b3c3658be0b73dfe367a46fdacf54153847d9b9 /config/lightsquid/lightsquid.inc
parent3c73359bc079d5c68ff73e4e629cf1eba739bb00 (diff)
downloadpfsense-packages-b45090398fec02835d5ada9255f4b5dd97865c42.tar.gz
pfsense-packages-b45090398fec02835d5ada9255f4b5dd97865c42.tar.bz2
pfsense-packages-b45090398fec02835d5ada9255f4b5dd97865c42.zip
Fixup template installation broken on my last changes. Bump version to 2.40
Diffstat (limited to 'config/lightsquid/lightsquid.inc')
-rw-r--r--config/lightsquid/lightsquid.inc14
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");
}