On Thu, 21 Oct 2004, Joachim Smit wrote:
Now, I have the following problem.
I can run './configure' with several options like: --enable-redhat, --enable-suse etcetera to install the start scripts. There isn't an option --enable-debian.
You need an init script which will start up afpd, and whatever else in that package you use. (In particular, note that you need a cnid_xxx daemon; it does some housekeeping for the AppleShare catalog. I use cnid_metad, primarily because it's easy to deal with.)
Essentially, all you need the script to do is this:
/usr/local/sbin/afpd /usr/local/sbin/cnid_metad
I did that manually, at the command line, while testing. Then I adapted a Debian's "skeleton" init script to the task, which I paste below. Then you need to make the appropriate symlinks in /etc/rcN.d, or use sysv-rc-conf to do that for you, or use file-rc. I use file-rc.
(Warning, those familiar with Debian init scripts might find this ugly. Maybe this will shame me into cleaning it up and submitting it to upstream :)
----------
#!/bin/sh # # skeleton Example initscript # This file should be used to construct scripts to be # placed in /etc/init.d. # # Author: Miquel van Smoorenburg <[EMAIL PROTECTED]>. # Ian Murdock <[EMAIL PROTECTED]>. # # Please remove the "Author" lines above and replace them # with your own name if you copy and modify this script. # # Version: @(#)skeleton 2.85-23 28-Jul-2004 [EMAIL PROTECTED]
set -e
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin DESC="AppleShare server" NAME=afpd DAEMON=/usr/local/sbin/$NAME PIDFILE=/var/run/$NAME.pid SCRIPTNAME=/etc/init.d/local-netatalk
# Gracefully exit if the package has been removed. test -x $DAEMON || exit 0
# Read config file if it is present. #if [ -r /etc/default/$NAME ] #then # . /etc/default/$NAME #fi
case "$1" in start) echo -n "Starting $DESC: $NAME" /usr/local/sbin/afpd -I -P $PIDFILE /usr/local/sbin/cnid_metad echo "." ;; stop) echo -n "Stopping $DESC: $NAME" kill `cat $PIDFILE` pkill cnid_metad echo "." ;; #reload) # # If the daemon can reload its configuration without # restarting (for example, when it is sent a SIGHUP), # then implement that here. # # If the daemon responds to changes in its config file # directly anyway, make this an "exit 0". # # echo -n "Reloading $DESC configuration..." # d_reload # echo "done." #;; restart|force-reload) # # If the "reload" option is implemented, move the "force-reload" # option to the "reload" entry above. If not, "force-reload" is # just the same as "restart". # echo -n "Restarting $DESC: $NAME" kill `cat $PIDFILE` pkill cnid_metad
sleep 1
/usr/local/sbin/afpd -I -P $PIDFILE /usr/local/sbin/cnid_metad echo "." ;; *) # echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2 echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2 exit 1 ;; esac
exit 0
-- Aaron Hall : I do quarrel with logic that says, "Stupid people [EMAIL PROTECTED] : are associated with X, therefore X is stupid." : Stupid people are associated with everything. : -- Larry Wall
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]