Skip to content

Commit 5703506

Browse files
authored
Merge pull request #56 from oleludwig/make-uninstall
Add make target and documentation to help with uninstalling WendzelNNTPd
2 parents 421569b + 50f187a commit 5703506

File tree

4 files changed

+41
-1
lines changed

4 files changed

+41
-1
lines changed

Makefile.in

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,32 @@ upgrade : bin/wendzelnntpd bin/wendzelnntpadm
226226
$(INSTALL_DATA) $(MANPAGES) $(DESTDIR)$(man8dir)
227227
@echo "Upgrade finished. Thank you for upgrading and using this software. Have fun!"
228228

229+
uninstall :
230+
# binaries
231+
-rm -f $(DESTDIR)$(sbindir)/wendzelnntpd
232+
-rm -f $(DESTDIR)$(sbindir)/wendzelnntpadm
233+
-rm -f $(DESTDIR)$(sbindir)/create_certificate
234+
# data files
235+
-rm -f $(DESTDIR)$(package_datadir)/openssl.cnf
236+
# documentation
237+
-cd $(DESTDIR)$(docdir)/ && rm -f $(notdir $(DOCFILES_TO_INST))
238+
-rm -f $(DESTDIR)$(docdir)/docs.pdf
239+
-rm -rf $(DESTDIR)$(docdir)/site/
240+
# manpages
241+
-cd $(DESTDIR)$(man8dir) && rm -f $(notdir $(MANPAGES))
242+
# directories
243+
-rmdir --ignore-fail-on-non-empty $(DESTDIR)$(confdir)
244+
-rmdir --ignore-fail-on-non-empty $(DESTDIR)$(sbindir)
245+
-rmdir --ignore-fail-on-non-empty $(DESTDIR)$(package_datadir)
246+
-rmdir --ignore-fail-on-non-empty $(DESTDIR)$(docdir)
247+
-rmdir --ignore-fail-on-non-empty $(DESTDIR)$(man8dir)
248+
-rmdir --ignore-fail-on-non-empty $(DESTDIR)$(mandir)
249+
-rmdir --ignore-fail-on-non-empty $(DESTDIR)$(UDBDIR)
250+
@echo
251+
@echo "Uninstall finished. Please note that the wendzelnntpd.conf (and possibly backups of it) and ssl certificates are left in place under $(DESTDIR)$(confdir)."
252+
@echo "The database (and possibly backups) and other user data like articles are also left in place under $(UDBDIR)."
253+
@echo "The log file /var/log/wendzelnntpd is also left in place. You might consider deleting them now."
254+
229255
exec : bin/wendzelnntpd
230256
./bin/wendzelnntpd
231257

docs/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# List of the mardown files which should be included in the pdf documentation.
22
# The order of the files corresponds to the order of the chapters in the PDF.
3-
DOCFILES=docs/index.md docs/install.md docs/configuration.md docs/running.md docs/development.md docs/upgrade.md
3+
DOCFILES=docs/index.md docs/install.md docs/configuration.md docs/running.md docs/development.md docs/upgrade.md docs/uninstall.md
44

55
all : site docs.pdf
66

docs/docs/uninstall.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Uninstallation
2+
3+
WendzelNNTPd can be uninstalled with `make uninstall` if you installed it from source.
4+
`./configure` needs to be called with the same parameters as during installation.
5+
You need superuser access to uninstall WendzelNNTPd.
6+
It is recommended to use the same version of the sources of WendzelNNTPd as the one installed.
7+
The configuration files, SQLite database, postings and log files are left in place to prevent data loss.
8+
You need to remove them manually if desired.
9+
10+
```console
11+
$ ./configure
12+
$ sudo make uninstall
13+
```

docs/mkdocs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ nav:
66
- Running: running.md
77
- Development: development.md
88
- Upgrade: upgrade.md
9+
- Uninstallation: uninstall.md
910
theme: readthedocs
1011
repo_url: https://github.com/cdpxe/WendzelNNTPd
1112
edit_uri: edit/master/docs/docs/

0 commit comments

Comments
 (0)