Rename entire project from `fw' to `fwd'.
[fwd] / debian / fwd.init
similarity index 91%
rename from debian/fw.init
rename to debian/fwd.init
index 6769a53..82dcc61 100644 (file)
@@ -1,6 +1,6 @@
 #! /bin/sh
 ### BEGIN INIT INFO
-# Provides:          fw
+# Provides:          fwd
 # Required-Start:    $local_fs $remote_fs
 # Required-Stop:     $local_fs $remote_fs
 # Default-Start:     2 3 4 5
 # PATH should only include /usr/* if it runs after the mountnfs.sh script
 PATH=/sbin:/usr/sbin:/bin:/usr/bin
 DESC="port forwarding daemon"
-NAME=fw
-DAEMON=/usr/bin/fw
+NAME=fwd
+DAEMON=/usr/bin/fwd
 PIDFILE=/var/run/$NAME.pid
 SCRIPTNAME=/etc/init.d/$NAME
-FWUSER=fw FWGROUP=fw
+FWUSER=fwd FWGROUP=fwd
 DAEMON_ARGS="--syslog"
-CONFIG=/etc/fw.conf
+CONFIG=/etc/fwd.conf
+OLDCONFIG=/etc/fw.conf
 
 # Exit if the package is not installed
 [ -x "$DAEMON" ] || exit 0
@@ -32,6 +33,11 @@ CONFIG=/etc/fw.conf
 [ -r /etc/default/$NAME ] && . /etc/default/$NAME
 
 # Exit if no configuration file
+if [ -r "$CONFIG" ] && [ -r "$OLDCONFIG" ]; then
+  log_warning_message \
+    "Using old config file /etc/fw.conf.  Please rename it to /etc/fwd.conf."
+  CONFIG=$OLDCONFIG
+fi
 [ -r "$CONFIG" ] || exit 0
 
 # Load the VERBOSE setting and other rcS variables