mirror of
https://github.com/anope/anope.git
synced 2026-06-28 04:56:38 +02:00
Place runtime module binaries in data/runtime instead of lib/ incase of a system wide install where lib/ is not writable
This commit is contained in:
+2
-2
@@ -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
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user