1 #!/bin/sh /etc/rc.common
3 # Fwknop is developed primarily by the people listed in the file 'AUTHORS'.
4 # Copyright (C) 2009-2014 fwknop developers and contributors. For a full
5 # list of contributors, see the file 'CREDITS'.
11 FWKNOPD_BIN
=/usr
/sbin
/fwknopd
39 [ -f /tmp
/access.conf.tmp
] && rm /tmp
/access.conf.tmp
43 if [ "$type" = "global" ]; then
47 if [ "$option" = "uci_enabled" ] && [ "$value" -eq 1 ] ; then
48 > /etc
/fwknop
/fwknopd.conf
49 > /etc
/fwknop
/access.conf
53 elif [ "$type" = "config" ]; then
57 if [ $UCI_ENABLED ]; then
58 echo "$option $value" >> /etc
/fwknop
/fwknopd.conf
#writing each option to fwknopd.conf
61 elif [ "$type" = "access" ]
63 if [ -f /tmp
/access.conf.tmp
] ; then
64 cat /tmp
/access.conf.tmp
>> /etc
/fwknop
/access.conf
65 rm /tmp
/access.conf.tmp
70 if [ $UCI_ENABLED ] && [ $option = "SOURCE" ]; then
71 echo "$option $value" >> /etc
/fwknop
/access.conf
#writing each option to access.conf
73 if [ $UCI_ENABLED ] && [ $option != "SOURCE" ]; then
74 echo "$option $value" >> /tmp
/access.conf.tmp
#writing each option to access.conf
80 if [ -f /etc
/config
/fwknopd
]; then
82 if [ -f /tmp
/access.conf.tmp
] ; then
83 cat /tmp
/access.conf.tmp
>> /etc
/fwknop
/access.conf
84 rm /tmp
/access.conf.tmp