File: netfilter-persistent.init

package info (click to toggle)
iptables-persistent 1.0.11%2Bdeb10u1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 236 kB
  • sloc: sh: 336; makefile: 17
file content (50 lines) | stat: -rw-r--r-- 1,364 bytes parent folder | download | duplicates (7)
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#!/bin/sh

# This file is part of netfilter-persistent
# Copyright (C) 2014 Jonathan Wiltshire
# 
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation, either version 3
# of the License, or (at your option) any later version.

### BEGIN INIT INFO
# Provides:          netfilter-persistent
# Required-Start:    mountkernfs $remote_fs
# Required-Stop:     $remote_fs
# Default-Start:     S
# Default-Stop:      0 1 6
# Short-Description: Load boot-time netfilter configuration
# Description:       Loads boot-time netfilter configuration
### END INIT INFO

. /lib/lsb/init-functions

case "$1" in
start|restart|reload|force-reload)
    log_action_begin_msg "Loading netfilter rules"
    /usr/sbin/netfilter-persistent start
    log_action_end_msg $?
	;;
save)
    log_action_begin_msg "Saving netfilter rules"
    /usr/sbin/netfilter-persistent save
    log_action_end_msg $?
	;;
stop)
    log_action_begin_msg "Stopping netfilter rules"
    /usr/sbin/netfilter-persistent stop
    log_action_end_msg $?
	;;
flush)
    log_action_begin_msg "Flushing netfilter rules"
    /usr/sbin/netfilter-persistent flush
    log_action_end_msg $?
	;;
*)
    echo "Usage: $0 {start|restart|reload|force-reload|save|flush}" >&2
    exit 1
    ;;
esac

exit $rc