1
0
mirror of https://github.com/unrealircd/unrealircd.git synced 2026-06-12 17:14:46 +02:00
Commit Graph

57 Commits

Author SHA1 Message Date
Bram Matthys be08bc2e33 Let's call it "./unrealircd mkcert" instead (like mkpasswd). Fix test suite. 2026-06-05 16:51:22 +02:00
Bram Matthys 982325fc82 Move "make pem" to "./unrealircd makecert" and make tools use this
and refer to this as well.

Suggested by PeGaSuS in https://bugs.unrealircd.org/view.php?id=6610

This also moves extras/tls.cnf to doc/conf/tls/tls.cnf which
also gets installed in ~/unrealircd/conf/tls/ (or whatever CONFDIR is)

And just to be clear: this means you can run "./unrealircd makecert"
without needing to go into BUILDDIR (or even having it at all).

At the same time, the generation commands have been modified slightly
so two warnings during certificate generation are no longer there.
2026-06-05 16:08:40 +02:00
Bram Matthys 82417d0cd2 Don't write PID file if running in foreground mode (-F) and error on
./unrealircd [start|stop|restart] commands if unrealircd is running
but without a pid, which will be the case if running through systemd.

The systemd example unit files will be in a future commit.
2025-10-29 10:04:32 +01:00
Bram Matthys 21476d6896 Fix ./unrealircd hot-patch in case of zero byte patch file.
Such a file is served if the UnrealIRCd version is unaffected.
It printed "This UnrealIRCd version does not require that patch"
but then instead of stopping it continued.. which wasn't all
that bad before GPG/PGP but now it causes failures and scary
warnings.

(See also 035f487684 which
 introduced GPG/PGP)

[skip ci]
2024-08-20 13:46:36 +02:00
Bram Matthys 035f487684 Add GPG/PGP signature verification for ./unrealircd hot-patch/cold-patch.
Similar to what we already do in './unrealircd upgrade' (in fact, code
stolen from that extras/unrealircd-upgrade-script.in file)
2024-08-10 15:58:35 +02:00
TehPeGaSuS 3ffc54484b Add a mention on how to upgrade to the next RC on the ./unrealircd upgrade command (#291) 2024-07-17 12:22:39 +00:00
Valerie Liu ede774f5eb Add ./unrealircd coffee (#274)
:>
2024-03-17 11:05:10 +00:00
ZarTek @ CREOLE 06f1357698 Get rid of forgotten references to ./unrealircd upgrade-conf (#241) 2022-12-14 18:47:43 +00:00
Bram Matthys 4992804f4e Enhance ./unrealircd start and ./unrealircd restart:
* The `./unrealircd start` command will now refuse to start if UnrealIRCd
  is already running.
* The `./unrealircd restart` command will validate the configuration file
  (it will call `./unrealircd configtest`). If there is a configuration
  error then the restart will not go through and the current UnrealIRCd
  process is kept running.
2022-12-12 14:58:20 +01:00
Bram Matthys b7f2ce9fd8 Show better error on ./unrealircd start when .so files are missing.
And refer to https://www.unrealircd.org/docs/FAQ#shared-library-error
2022-12-12 09:22:24 +01:00
Bram Matthys fa15ea2567 ./unrealircd hot-patch: now that we have rehash output and status codes
in 6.0.2+ we can inform the user whether the rehash actually succeeded
or not. This was already shown in the output, but we now also change
the last few lines of output to make very clear if the rehash failed
that the currently running UnrealIRCd is not patched.
2022-01-29 14:57:09 +01:00
Bram Matthys 752ab1abf8 Fix case where people don't use ./unrealircd hot-patch but use something
like /home/xyz/unrealircd/unrealircd hot-patch instead. In other words,
if the current working directory is not the location of the unrealircd
script. Then calling ./unrealircd rehash, so the last step in the patching
process, would fail. Reported by k4be.
[skip ci]
2022-01-29 14:50:01 +01:00
Bram Matthys 17913151ed Fix ./unrealircd hot-patch: if a patch does not cleanly apply then
don't apply it. The dry-run code was missing the most obvious case..
2022-01-29 14:40:32 +01:00
Bram Matthys cd3b50d2f8 Update ./unrealircd usage info. 2022-01-28 08:57:47 +01:00
Bram Matthys f650239b4f Add "./unrealircd module-status" to show currently loaded modules,
including version, description, author, flags. The output is
pretty much identical to "MODULE -all" on IRC as IRCOp.

Useful for the future if you want to verify a module has been
upgraded from the command line.
2022-01-28 08:45:20 +01:00
Bram Matthys 92c81b194f Move "spkifp" to unrealircdctl, so it is available for Windows users.
For *NIX users no visible change.
2022-01-03 14:48:00 +01:00
Bram Matthys 3dd7c19c77 Move "gencloak" to unrealircdctl, so it is available for Windows users.
For *NIX users no visible change.
2022-01-03 14:28:10 +01:00
Bram Matthys e35c29f3d5 Move mkpasswd operation to unrealircdctl. For *NIX users no change as this
is done behind-the-scenes (the command is still ./unrealircd mkpasswd).
For Windows users it finally means they can generate passwords via the CLI
using: unrealircdctl mkpasswd pwdhere
2022-01-03 14:14:12 +01:00
Bram Matthys 39688517b0 Make "./unrealircd rehash" show output on the terminal, same for
"./unrealircd reloadtls" and there is now also a "./unrealircd status"

The output is colorized if the terminal supports it (just like on the
boot screen) and also the exit status is 0 for success and non-0 for
failure. The purpose of all this is that you can easily detect rehash
errors on the command line.

These three commands communicate to UnrealIRCd via the new control
UNIX socket, which is in ~/data/unrealircd.ctl.
This also does a lot of other stuff because we now have an internal
tool called bin/unrealircdctl which is called by ./unrealircd for
some of the commands to communicate to the unrealircd.ctl socket.
Later on more of the existing functionality may be moved to that
tool and we may also provide it on Windows in CLI mode so people
have more of the same functionality as on *NIX.
2022-01-02 20:17:36 +01:00
Bram Matthys 73be662db2 Make "./unrealircd upgrade" return exit codes from stage 2 as well.
Exit status is now documented at https://www.unrealircd.org/docs/Upgrading
and can be used to see the difference between:
* upgrade+configtest OK,
* upgrade OK but configtest failed
* some other failure
* no newer version available
Handy for scripting...
2021-12-29 10:04:00 +01:00
Bram Matthys fa5526a44b Add a warning to ./unrealircd spkifp about it using the default certificate
locations, and inform the user that they can specify a file.

This doesn't solve https://bugs.unrealircd.org/view.php?id=6021 completely
but at least makes the user aware of this.

Reported by arcanefeenix and crazycat.
2021-12-28 18:31:38 +01:00
Bram Matthys 11507b3fbb Move export ASAN_OPTIONS to beginning of script so it is used not
only for "./unrealircd start" but also for configtest, genlinkblock, etc.
2021-11-20 17:18:47 +01:00
Bram Matthys 4397450bd0 Revert LD_LIBRARY_PATH= in unrealircd script, as we use -rpath for that. 2021-09-24 16:57:52 +02:00
Bram Matthys a2a9eebf98 Get rid of ./unrealircd upgrade-conf (was for 3.2.x to 4.x) 2021-09-24 16:40:42 +02:00
k4be b15ddd760a Fix geoip library build and geoip_classic loading 2021-08-26 11:25:26 +02:00
Bram Matthys 67deb7ec8c UnrealIRCd script: restart is now identical to stop+start (:D) 2021-06-04 09:16:44 +02:00
Bram Matthys 2375c35f2b Fix crashreporter to show big warning if you have 3rd party modules
loaded. The code to raise this warning was already present but it
was not being shown in many cases (when it actually should).

It now looks like this, if you run ./unrealircd start and previously
crashed AND have any 3rd party mods loaded:

The IRCd has been started now (and is running), but it did crash 1 seconds ago.
Crash report generated in: /home/ircd/unrealircd/tmp/crash.report.core.1621838267.txt

** IMPORTANT **
Your UnrealIRCd crashed and you have 3rd party modules loaded (modules created
by someone other than the UnrealIRCd team). If you installed new 3rd party
module(s) in the past few weeks we suggest to unload these modules and see if
the crash issue dissapears. If so, that module is probably to blame.
If you keep crashing without any 3rd party modules loaded then please do report
it to the UnrealIRCd team.
The reason we ask you to do this is because MORE THAN 95% OF ALL CRASH ISSUES
ARE CAUSED BY 3RD PARTY MODULES and not by an UnrealIRCd bug.

Shall I send a crash report to the UnrealIRCd developers?
NOTE: If the crash is caused by a 3rd party module then UnrealIRCd devs can't fix that.
2021-05-24 08:38:07 +02:00
Bram Matthys 61e0ed3d03 Give UnrealIRCd 10 seconds to terminate insteads of just 1, now that
we may have more database writing to do on terminate.

Actually 10 seconds would be really long, but 2-3 seconds may be
quite realistic if you have lots of TKLs, permanent channels,
reputation entries (users), etc.

Oh yeah, and I really hate writing PORTABLE shell code...
2021-05-17 09:05:47 +02:00
Bram Matthys 29e8c2c770 Mention './unrealircd genlinkblock' as it should work in 5.0.8+. 2021-03-08 09:45:11 +01:00
Bram Matthys 0e125abc36 New: "./unrealircd upgrade" to upgrade to latest UnrealIRCd release. 2021-01-10 16:22:33 +01:00
Bram Matthys 498f65aaad Improve the error a little bit if unrealircd.conf is missing.
Remove the talk about 3.2.x and and give a bit more context before
providing the link to the docs (which was already there, but still).
2020-04-18 10:22:47 +02:00
Bram Matthys 870057d4f3 Add "./unrealircd genlinkblock" which spits out a link { } block. Hmm...
we'll see later if this is a good idea or not.. it has pros and cons.
2020-01-19 19:34:11 +01:00
Bram Matthys ffd0acf5d5 Add ./unrealircd <hot-patch|cold-patch> <nameofpatch> which will be
useful in the future. This would download a specific patch from
the unrealircd.org site, apply it, recompile, and then:
if it's a hot-patch it would rehash
if it's a cold-patch it would print a message that you should restart
the irc server.
2020-01-19 18:16:47 +01:00
Bram Matthys d9166bd62d Disable address sanitizer (ASan) now that we are preparing for 5.0.0 stable.
This can still be enabled during ./Config by answering to the last question:
--with-asan
But it is no longer enabled by default since it causes a slowdown of X and
increases memory by a factor Y.
2019-12-05 20:16:44 +01:00
Bram Matthys dfa83aa6e5 Add module manager. See https://www.unrealircd.org/docs/Module_manager
Also update release notes and some unrelated changes.
BIG commits. Lots of work. Requires more testing.
2019-11-01 12:57:12 +01:00
Bram Matthys 298e9f2ea6 Advertise 'configtest' in './unrealircd' usage/help.
[skip ci]
2019-10-26 19:02:45 +02:00
Bram Matthys fb8055c6ef Add './unrealircd configtest' which tests the configuration but does
not actually start the server. Any warnings and errors are printed
only to the console.
Suggested in https://bugs.unrealircd.org/view.php?id=5219
2019-10-26 18:55:26 +02:00
Bram Matthys 953cb774ad ASan: log to tmp/unrealircd_asan.<pid> and attach this if the IRCd
crashes (has a core file) to the crash bug report.
Also, disable leak detection since this is too noisy and would cause
a core dump each time + bothering the user to submit a crash report
+ send this crashreport etc. We still enable this in our own tests
though, but not for end-users.
2019-09-21 18:04:30 +02:00
Bram Matthys 19a0d205e6 Enable core dumps if using ASan (applies to alpha/beta and dev builds) 2019-08-27 16:27:56 +02:00
Bram Matthys 09cf485d6c Mass rename of "ssl" to "tls" everywhere. Including conf/ssl to
conf/tls. If you are upgrading then conf/ssl will be renamed to
conf/tls and a symlink will be added (so certbot etc won't fail).
This is part 1...
2019-08-12 14:26:31 +02:00
Bram Matthys ad063ba36a Fix ./unrealircd spkifp complaining that it could not find the certificate
file if you specified a relative path. Until now only absolute paths worked.
Bug reported by CrazyCat.
2019-03-08 09:32:05 +01:00
Bram Matthys 6fcacdf148 Fix './unrealircd backtrace' not working correctly in non-English environments.
The script symlinks any missing tmp/xxxx.so's to the real module name but
depends on English statements (ugly, yeah, but it works). With a non-English
locale this did previously not work so the backtrace was screwed.
2019-01-21 13:30:15 +01:00
Bram Matthys 9e1160b74f Add './unrealircd spkifp' which will output the SPKI fingerprint
along with the exact password section to use in the link block
on the other side of the link.
Also used in tutorial now at
https://www.unrealircd.org/docs/Tutorial:_Linking_servers
2017-10-09 14:59:19 +02:00
Bram Matthys 91e108499e Convert remaining http:// links to https:// 2017-09-15 08:19:08 +02:00
netjester 1fc6a0efaf Fix #0004826
Fixes #0004826: ./unrealircd stop always says unrealircd.pid: No such file

https://bugs.unrealircd.org/view.php?id=4826
2016-12-29 17:47:11 +00:00
Bram Matthys b3c371ddf4 Add './unrealircd reloadtls' to reload SSL/TLS certificates and keys.
Suggested by Bob_Sheep (#4537) to aid the usage of Let's Encrypt.
Note that this is the same as doing '/REHASH -ssl' on IRC.
2016-01-13 11:37:17 +01:00
Bram Matthys 3428528684 Add "./unrealircd croncheck" which will start UnrealIRCd if it isn't running and bail out quietly otherwise. This can be used from *surprise!* crontab. The old broken cron script has been removed. (#4508) 2015-12-26 16:00:23 +01:00
Bram Matthys a565a68f36 Unreal -> UnrealIRCd 2015-10-11 17:31:59 +02:00
Bram Matthys 507d88cf09 Bump version to 4.0.0-rc1 2015-10-10 17:44:52 +02:00
Bram Matthys ad23afc81f Improve (error) messages shown on console while booting. Fatal boot errors are now shown on the console, no need to check ircd.log. 2015-08-10 21:50:23 +02:00