Ai
1 Star 0 Fork 0

wangcichen/urbackup_backend

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
init.d_client_rh 2.05 KB
一键复制 编辑 原始数据 按行查看 历史
Martin 提交于 2016-01-21 03:23 +08:00 . Always exclude /proc, /dev and /sys on Linux
#!/bin/sh
#
# chkconfig: 345 85 15
# description: Urbackup client daemon
# config: /etc/sysconfig/urbackupclient
#
### BEGIN INIT INFO
# Provides: urbackupclientbackend
# Required-Start: $network $local_fs $remote_fs
# Required-Stop: $remote_fs $local_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Daemon process for UrBackup Client
# Description: This software does backups
# with special client software
#
### END INIT INFO
# Author: kot1grun
# Author: Martin Raiber <martin@urbackup.org>
# Source function library.
. /etc/rc.d/init.d/functions
DESC="UrBackup Client Daemon" # Introduce a short description here
NAME="urbackupclientbackend" # Introduce the short server's name here
PREFIX="/usr/local"
DAEMON=$PREFIX/sbin/urbackupclientbackend # Introduce the server's location here
PIDFILE=/var/run/$NAME.pid
SCRIPTNAME=/etc/init.d/$NAME
prog=urbackupclientbackend
if [ ! -x $DAEMON ]
then
exit 5
fi
lockfile=/var/lock/subsys/$NAME
# Function that starts the daemon/service
start()
{
echo -n $"Starting UrBackup client: "
daemon $DAEMON --daemon --config "/etc/sysconfig/urbackupclient" --pidfile $PIDFILE
retval=$?
echo
[ $retval -eq 0 ] && touch $lockfile
return $retval
}
stop()
{
echo -n $"Shutting down UrBackup client: "
killproc $prog
retval=$?
echo
[ $retval -eq 0 ] && ( rm -f $lockfile > /dev/null 2>&1 )
return $retval
}
restart()
{
echo -n $"Restarting $DESC" "$NAME"
stop
start
}
case "$1" in
start|stop|restart)
$1
;;
force-reload)
restart
;;
status)
status $prog
;;
try-restart|condrestart)
if status $prog >/dev/null ; then
restart
fi
;;
reload)
action $"Service ${0##*/} does not support the reload action: " /bin/false
exit 3
;;
*)
echo $"Usage: $0 {start|stop|status|restart|try-restart|force-reload}"
exit 2
;;
esac
exit $retval
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C
1
https://gitee.com/wangcichen/urbackup_backend.git
git@gitee.com:wangcichen/urbackup_backend.git
wangcichen
urbackup_backend
urbackup_backend
dev

搜索帮助