~kampka/ubuntu/quantal/fwknop/upstart-support

« back to all changes in this revision

Viewing changes to debian/fwknop-server.postrm

  • Committer: Bazaar Package Importer
  • Author(s): Franck Joncourt
  • Date: 2008-10-02 19:32:55 UTC
  • Revision ID: james.westby@ubuntu.com-20081002193255-02knm8mw3oxt0ojl
Tags: 1.9.8-1
* Initial release (Closes: #406627) 
* Includes fr debconf translation (Closes: #500655)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh
 
2
 
 
3
set -e
 
4
 
 
5
# In case the user want to purge all files of the fwknop-server package
 
6
# we must remove manually pid, socket and log files before the main 
 
7
# directories are removed.
 
8
if [ "$1" = "purge" ]; then
 
9
 
 
10
        # Handle the /var/run/fwknop directory that contains pid and socket
 
11
        # files
 
12
        if [ -d /var/run/fwknop ]; then
 
13
                find /var/run/fwknop/ -type f -exec rm {} \;
 
14
                find /var/run/fwknop/ -type s -exec rm {} \;
 
15
        fi
 
16
 
 
17
        # Handle the /var/log/fwknop directory that contains log files 
 
18
        if [ -d /var/log/fwknop ]; then
 
19
                find /var/log/fwknop/ -type f -exec rm {} \;
 
20
                if [ -d /var/log/fwknop/errs ]; then
 
21
                        find /var/log/fwknop/errs/ -type f -exec rm {} \;
 
22
                        rmdir /var/log/fwknop/errs
 
23
                fi
 
24
        fi
 
25
 
 
26
fi
 
27
 
 
28
#DEBHELPER#
 
29
 
 
30
exit 0;