File: prerm

package info (click to toggle)
l2tp-ipsec-vpn 1.0.9-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 1,396 kB
  • sloc: cpp: 9,952; xml: 400; makefile: 139; sh: 78
file content (32 lines) | stat: -rw-r--r-- 759 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#! /bin/sh
#
# This is the prerm script for the Debian GNU/Linux l2tp-ipsec-vpn package
#
# Written by Werner Jaeger
#
set -e

if [ "$1" = "remove" ] ; then
   # if applet is running try to terminate it
   PIDS=$(pidof L2tpIPsecVpn || true)
   if [ -n "$PIDS" ]; then
      echo "Trying to terminate L2tpIPsecVpn applet" >&2
      kill $PIDS || true
   fi

	# Remove all generated configuration files
   echo "Trying to delete all generated config files" >&2
   L2tpIPsecVpn deleteAllConfFiles || true

   # Remove syslog pipe and restart syslog service
   rm -f /var/log/l2tpipsecvpn.pipe
   invoke-rc.d rsyslog restart || true
fi


# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.

#DEBHELPER#

exit 0