diff --git a/contrib/bin/fusiondirectory-setup b/contrib/bin/fusiondirectory-setup
index 51875f2fc19e189e30266891bfd2eff52d08b2b0..d3bd4a1bc853a2c6c92dcf7587e60f6b03361ba0 100644
--- a/contrib/bin/fusiondirectory-setup
+++ b/contrib/bin/fusiondirectory-setup
@@ -34,6 +34,7 @@ my %vars = (
  fd_home          => "/var/www/fusiondirectory",
  fd_cache         => "/var/cache/fusiondirectory",
  fd_config_dir    => "/etc/fusiondirectory",
+ fd_smarty_dir    => "/usr/share/php/smarty3/Smarty.class.php",
  fd_spool_dir     => "/var/spool/fusiondirectory",
  config_file      => "fusiondirectory.conf",
  secrets_file     => "fusiondirectory.secrets",
@@ -456,8 +457,11 @@ sub write_vars {
     define ("CONFIG_FILE", "$vars{config_file}"); /* FusionDirectory filename */
   }
 
-  /* Smarty compile dir */
-  define ("SPOOL_DIR","$vars{fd_spool_dir}/"); /* FusionDirectory spool directory */
+/* Path for smarty3 libraries */
+define("SMARTY", "$vars{fd_smarty_dir}");
+
+/* Smarty compile dir */
+define ("SPOOL_DIR", "$vars{fd_spool_dir}/"); /* FusionDirectory spool directory */
 
   /* Global cache dir */
   define ("CACHE_DIR","$vars{fd_cache}/"); /* FusionDirectory var directory */
diff --git a/include/variables.inc b/include/variables.inc
index 5836bc9335b7767ecbf1711f60ebcd58f55ce301..b32730aa3a4ef5ec80378e2be717cb95db95475e 100644
--- a/include/variables.inc
+++ b/include/variables.inc
@@ -20,63 +20,69 @@
   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
 */
 
-  /*!
-   * \file variables.inc
-   * Define common locations and variables
-   * Generated by fusiondirectory-setup
-   */
-
-  require_once('variables_common.inc');
-
-  if(!defined("CONFIG_DIR")){
-    define ("CONFIG_DIR", "/etc/fusiondirectory/"); /* FusionDirectory etc path */
-  }
-
-  /*!
-   * \brief Allow setting the config file in the apache configuration
-   *   e.g.  SetEnv CONFIG_FILE fusiondirectory.conf 1.0
-   */
-  if(!defined("CONFIG_FILE")){
-    define ("CONFIG_FILE", "fusiondirectory.conf"); /* FusionDirectory filename */
-  }
-
-  /*!
-   * \brief Smarty compile dir
-   */
-  define ("SPOOL_DIR","/var/spool/fusiondirectory/"); /* FusionDirectory spool directory */
-
-  /*!
-   * \brief Global cache dir
-   */
-  define ("CACHE_DIR","/var/cache/fusiondirectory/"); /* FusionDirectory var directory */
-
-  /*!
-   * \brief Global locale cache dir
-   */
-  define ("LOCALE_DIR", "/var/cache/fusiondirectory/locale/"); /* FusionDirectory locale directory */
-
-  /*!
-   * \brief Global tmp dir
-   */
-  define ("TEMP_DIR", "/var/cache/fusiondirectory/tmp/"); /* FusionDirectory tmp directory */
-
-  /*!
-   * \brief Directory containing the configuration template
-   */
-  define ("CONFIG_TEMPLATE_DIR", "/var/cache/fusiondirectory/template/"); /* FusionDirectory template directory */
-
-  /*!
-   * \brief Directory containing the fai logs
-   */
-  define ("FAI_LOG_DIR", "/var/cache/fusiondirectory/fai/"); /* FusionDirectory fai directory */
-
-  /*!
-   * \brief Directory containing the vacation files
-   */
-  define ("SUPANN_DIR", "/etc/fusiondirectory/supann/"); /* FusionDirectory supann template directory */
-
-  /*!
-   * \brief name of the class.cache file
-   */
-  define("CLASS_CACHE", "class.cache"); /* name of the class cache */
+/*!
+ * \file variables.inc
+ * Define common locations and variables
+ * Generated by fusiondirectory-setup
+ */
+
+require_once('variables_common.inc');
+
+if (!defined("CONFIG_DIR")) {
+  define ("CONFIG_DIR", "/etc/fusiondirectory/"); /* FusionDirectory etc path */
+}
+
+/*!
+ * \brief Allow setting the config file in the apache configuration
+ *   e.g.  SetEnv CONFIG_FILE fusiondirectory.conf 1.0
+ */
+if (!defined("CONFIG_FILE")) {
+  define ("CONFIG_FILE", "fusiondirectory.conf"); /* FusionDirectory filename */
+}
+
+/*!
+ * \brief Path for smarty3 libraries
+ */
+define("SMARTY", "/usr/share/php/smarty3/Smarty.class.php");
+
+/*!
+ * \brief Smarty compile dir
+ */
+define ("SPOOL_DIR", "/var/spool/fusiondirectory/"); /* FusionDirectory spool directory */
+
+/*!
+ * \brief Global cache dir
+ */
+define ("CACHE_DIR", "/var/cache/fusiondirectory/"); /* FusionDirectory var directory */
+
+/*!
+ * \brief Global locale cache dir
+ */
+define ("LOCALE_DIR", "/var/cache/fusiondirectory/locale/"); /* FusionDirectory locale directory */
+
+/*!
+ * \brief Global tmp dir
+ */
+define ("TEMP_DIR", "/var/cache/fusiondirectory/tmp/"); /* FusionDirectory tmp directory */
+
+/*!
+ * \brief Directory containing the configuration template
+ */
+define ("CONFIG_TEMPLATE_DIR", "/var/cache/fusiondirectory/template/"); /* FusionDirectory template directory */
+
+/*!
+ * \brief Directory containing the fai logs
+ */
+define ("FAI_LOG_DIR", "/var/cache/fusiondirectory/fai/"); /* FusionDirectory fai directory */
+
+/*!
+ * \brief Directory containing the vacation files
+ */
+define ("SUPANN_DIR", "/etc/fusiondirectory/supann/"); /* FusionDirectory supann template directory */
+
+/*!
+ * \brief name of the class.cache file
+ */
+define("CLASS_CACHE", "class.cache"); /* name of the class cache */
+
 ?>
diff --git a/include/variables_common.inc b/include/variables_common.inc
index 3b63b70a9965879e63470251e44891eb66e6604d..f5a8f439e33f2cafc9e46f77a89e7fc07eb62b9b 100644
--- a/include/variables_common.inc
+++ b/include/variables_common.inc
@@ -61,11 +61,6 @@ define("FPDF","/usr/share/php/fpdf/fpdf.php"); /*! Define fpdf library path */
  */
 define("FPDF_FONTPATH", "/usr/share/php/fpdf/font/"); /*! Define fpdf font path  */
 
-/*!
- * \brief Path for smarty3 libraries
- */
-define("SMARTY", "/usr/share/php/smarty3/Smarty.class.php"); /*! Define smarty3 library path */
-
 /*!
  * \brief FusionDirectory Version
  */