Gentoo Forums :: View topic - gift instalation tips
Gentoo Forums :: View topic - gift tips: "Here's what I do to run giftd:
First, create a user called giftd, and set gift up for him (gift-setup and all). Set the permissions on his download directories so you can access them (preferably - for a certain group).
Then I've created the following 3 scripts:
~giftd/bin/start-giftd: (chmod a x)
Code:
#!/bin/sh
RETVAL=0
if [ -z `pidof giftd` ]; then
giftd -d 2> ~/.giftd.pid;
else
false;
fi
~giftd/bin/stop-giftd: (chmod a x)
Code:
#!/bin/sh
if [ -e ~/.giftd.pid ]; then
PID=`sed 's/.*giFT: //' ~/.giftd.pid`;
kill $PID;
if [ $? -eq 0 ]; then
rm ~/.giftd.pid
fi
elif [ -n `pidof giftd` ]; then
kill `pidof giftd`;
else
false;
fi
And finally:
/etc/init.d/giftd: (chmod a x)
Code:
#!/sbin/runscript
depend() {
need net
}
start() {
ebegin 'Starting giftd'
su - giftd -c '~/bin/start-giftd'
eend $?
}
stop() {
ebegin 'Stopping giftd'
su - giftd -c '~/bin/stop-giftd'
eend $?
}
Then you might want to:
Code:
rc-update add giftd default
/etc/init.d/giftd start"
0 Comments:
Postar um comentário
<< Home