Fetchmailの自動起動
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
単語検索
|
最終更新
|
ヘルプ
]
開始行:
コンピュータの再起動と同時にFetchmailが起動するように、以...
#!/bin/sh
#
# chkconfig: 345 99 20
#
# description: Fetchmail auto start script
# Source function library.
. /etc/rc.d/init.d/functions
# See how we were called.
case "$1" in
start)
for user in `ls /home/`
do
if [ -f /home/$user/.fetchmailrc ]; then
echo "fetchmail for $user starti...
su $user -c "/usr/bin/fetchmail ...
fi
done
;;
stop)
# Stop daemons.
for user in `ls /home/`
do
if [ -f /home/$user/.fetchmailrc ]; then
echo "fetchmail for $user stopin...
su $user -c "/usr/bin/fetchmail ...
fi
done
;;
*)
echo "Usage: $0 {start|stop}"
exit 1
esac
exit 0
>chkconfig --add fetchmail
>chkconfig --level 345 fetchmail start
[[:Mail]]
終了行:
コンピュータの再起動と同時にFetchmailが起動するように、以...
#!/bin/sh
#
# chkconfig: 345 99 20
#
# description: Fetchmail auto start script
# Source function library.
. /etc/rc.d/init.d/functions
# See how we were called.
case "$1" in
start)
for user in `ls /home/`
do
if [ -f /home/$user/.fetchmailrc ]; then
echo "fetchmail for $user starti...
su $user -c "/usr/bin/fetchmail ...
fi
done
;;
stop)
# Stop daemons.
for user in `ls /home/`
do
if [ -f /home/$user/.fetchmailrc ]; then
echo "fetchmail for $user stopin...
su $user -c "/usr/bin/fetchmail ...
fi
done
;;
*)
echo "Usage: $0 {start|stop}"
exit 1
esac
exit 0
>chkconfig --add fetchmail
>chkconfig --level 345 fetchmail start
[[:Mail]]
ページ名: