📄 install.sh
字号:
#!/bin/bash
###############################################
# sync_timer_discramble SNTP client
#
# CopyRight(C) Compunicate,Inc
###############################################
echo -e " Installing cti sntp client...\n "
if [ ! -f ./sync_timer_discramble -o ! -x ./sync_timer_discramble ]; then
echo -e "sync_timer_discramble not exist, exit!"
exit $?
fi
if [ ! -f ./configfile.ini ]; then
echo -e " configfile.ini not exist, exit ! \n"
exit $?
fi
if [ ! -d /var/log/sync_timer_discramble ] ; then
mkdir /var/log/sync_timer_discramble
fi
if ! cp ./sync_timer_discramble /usr/local/bin/sync_timer_discramble ; then
echo -e " Copy sync_timer_discramble Error exit !"
exit $?
fi
if ! cp ./configfile.ini /var/log/sync_timer_discramble/configfile.ini ;then
echo -e " Copy configfile Error exit !"
exit $?
fi
if ! grep sync_timer_discramble /etc/rc.d/rc.local > /dev/null 2>&1 ; then
if ! echo -e "\n/usr/local/bin/sync_timer_discramble \n" | cat >> /etc/rc.d/rc.local ; then
echo -e " Can not config auto starting sync_timer_discramble daemon \n"
exit $?
fi
else
echo -e "sync_timer_discramble daemon exist in rc.local \n "
fi
if ! /usr/local/bin/sync_timer_discramble ; then
echo -e " Can not start /usr/local/bin/sync_timer_discramble \n"
exit $?
fi
echo -e " sntp client sync_timer_discramble start, \n OK!"
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -