mirror of
https://github.com/znc/znc.git
synced 2026-08-07 09:22:55 +02:00
Print a warning if --enable-run-from-source is missing
If znc was compiled with "--disable-run-from-source" it will check if a file called "znc-uninstalled.pc" exists in the directory the znc binary is in. If there is such a file, it will print a warning that "--enable-run-from-source" is most likely missing. Idea partly by SilverLeo, thanks. git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@2001 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
@@ -185,6 +185,13 @@ int main(int argc, char** argv) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifndef RUN_FROM_SOURCE
|
||||
if (CFile::Exists(pZNC->GetCurPath() + "/znc-uninstalled.pc")) {
|
||||
CUtils::PrintError("It looks like you are running znc without installing it first.");
|
||||
CUtils::PrintError("Recompile with --enable-run-from-source if you intend to do that.");
|
||||
}
|
||||
#endif
|
||||
|
||||
if (isRoot()) {
|
||||
CUtils::PrintError("You are running ZNC as root! Don't do that! There are not many valid");
|
||||
CUtils::PrintError("reasons for this and it can, in theory, cause great damage!");
|
||||
|
||||
Reference in New Issue
Block a user