summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2012-09-30 18:59:14 -0400
committerAdam <Adam@anope.org>2012-09-30 20:30:27 -0400
commit56df1abdd89638355edcd65ff6f11f917bf63e5f (patch)
tree728bc99062ab63e06e9e14f22058ea4af04351c8
parent0ea5e57298ebee900f30b1440499e41a7606c550 (diff)
Place runtime module binaries in data/runtime instead of lib/ incase of a system wide install where lib/ is not writable
-rw-r--r--CMakeLists.txt4
-rw-r--r--src/modulemanager.cpp4
2 files changed, 4 insertions, 4 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3590cf986..359ad8045 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -487,12 +487,12 @@ get_filename_component(SERVICES_BINARY ${SERVICES_BINARY} NAME)
# At install time, create the following additional directories
install(CODE "file(MAKE_DIRECTORY \"\${CMAKE_INSTALL_PREFIX}/${DB_DIR}/backups\")")
install(CODE "file(MAKE_DIRECTORY \"\${CMAKE_INSTALL_PREFIX}/${LOGS_DIR}\")")
-install(CODE "file(MAKE_DIRECTORY \"\${CMAKE_INSTALL_PREFIX}/${LIB_DIR}/modules/runtime\")")
+install(CODE "file(MAKE_DIRECTORY \"\${CMAKE_INSTALL_PREFIX}/${DB_DIR}/runtime\")")
# On non-Windows platforms, if RUNGROUP is set, change the permissions of the below directories, as well as the group of the data directory
if(NOT WIN32 AND RUNGROUP)
install(CODE "execute_process(COMMAND ${CHMOD} 2775 \"\${CMAKE_INSTALL_PREFIX}/\${DB_DIR}/backups\")")
install(CODE "execute_process(COMMAND ${CHMOD} 2775 \"\${CMAKE_INSTALL_PREFIX}/\${LOGS_DIR}\")")
- install(CODE "execute_process(COMMAND ${CHMOD} 2775 \"\${CMAKE_INSTALL_PREFIX}/\${LIB_DIR}/modules/runtime\")")
+ install(CODE "execute_process(COMMAND ${CHMOD} 2775 \"\${CMAKE_INSTALL_PREFIX}/\${DB_DIR}/runtime\")")
install(CODE "execute_process(COMMAND ${CHGRP} -R ${RUNGROUP} \"\${CMAKE_INSTALL_PREFIX}\")")
endif(NOT WIN32 AND RUNGROUP)
# On Windows platforms, install extra files
diff --git a/src/modulemanager.cpp b/src/modulemanager.cpp
index 5fd2937f7..473e46a0f 100644
--- a/src/modulemanager.cpp
+++ b/src/modulemanager.cpp
@@ -23,7 +23,7 @@ std::vector<Module *> ModuleManager::EventHandlers[I_END];
void ModuleManager::CleanupRuntimeDirectory()
{
- Anope::string dirbuf = modules_dir + "/modules/runtime";
+ Anope::string dirbuf = db_dir + "/runtime";
Log(LOG_DEBUG) << "Cleaning out Module run time directory (" << dirbuf << ") - this may take a moment please wait";
@@ -135,7 +135,7 @@ ModuleReturn ModuleManager::LoadModule(const Anope::string &modname, User *u)
Log(LOG_DEBUG) << "trying to load [" << modname << "]";
/* Generate the filename for the temporary copy of the module */
- Anope::string pbuf = modules_dir + "/modules/runtime/" + modname + ".so.XXXXXX";
+ Anope::string pbuf = db_dir + "/runtime/" + modname + ".so.XXXXXX";
/* Don't skip return value checking! -GD */
ModuleReturn ret = moduleCopyFile(modname, pbuf);