代码拉取完成,页面将自动刷新
#!/bin/bash
if [[ $TRACKER_SERVER ]]; then
echo -e "---------------------------------------------------------------"
echo -e "--- *** FASTDFS CONFIGURATION OVERRIDE @ tracker-server *** ---"
echo -e "---------------------------------------------------------------"
new_ip=$TRACKER_SERVER
old_ip="127.0.0.1"
echo "$(sed "s/$old_ip/$new_ip/g" /etc/fdfs/client.conf)" > /etc/fdfs/client.conf
echo "$(sed "s/$old_ip/$new_ip/g" /etc/fdfs/storage.conf)" > /etc/fdfs/storage.conf
echo "$(sed "s/$old_ip/$new_ip/g" /etc/fdfs/mod_fastdfs.conf)" > /etc/fdfs/mod_fastdfs.conf
fi
if [[ $GROUP_NAME ]]; then
echo -e "-----------------------------------------------------------"
echo -e "--- *** FASTDFS CONFIGURATION OVERRIDE @ group-name *** ---"
echo -e "-----------------------------------------------------------"
new_group_name=$GROUP_NAME
old_group_name="MIIT"
echo "$(sed "s/$old_group_name/$new_group_name/g" /etc/fdfs/storage.conf)" > /etc/fdfs/storage.conf
fi
case $1 in
nginx )
echo -e "---------------------------"
echo -e "--- *** START NGINX *** ---"
echo -e "---------------------------"
/usr/sbin/nginx
;;
php )
echo -e "-------------------------"
echo -e "--- *** START PHP *** ---"
echo -e "-------------------------"
/usr/local/sbin/php-fpm
;;
fastdfs )
echo -e "-----------------------------"
echo -e "--- *** START TRACKER *** ---"
echo -e "-----------------------------"
/etc/init.d/fdfs_trackerd start
echo -e "-----------------------------"
echo -e "--- *** START STORAGE *** ---"
echo -e "-----------------------------"
/etc/init.d/fdfs_storaged start
;;
tracker )
echo -e "-----------------------------"
echo -e "--- *** START TRACKER *** ---"
echo -e "-----------------------------"
/etc/init.d/fdfs_trackerd start
;;
storage )
echo -e "-----------------------------"
echo -e "--- *** START STORAGE *** ---"
echo -e "-----------------------------"
/etc/init.d/fdfs_storaged start
;;
* )
echo -e "---------------------------"
echo -e "--- *** START NGINX *** ---"
echo -e "---------------------------\n"
/usr/sbin/nginx
echo -e "-------------------------"
echo -e "--- *** START PHP *** ---"
echo -e "-------------------------\n"
/usr/local/sbin/php-fpm
echo -e "-----------------------------"
echo -e "--- *** START TRACKER *** ---"
echo -e "-----------------------------\n"
/etc/init.d/fdfs_trackerd start
echo -e "-----------------------------"
echo -e "--- *** START STORAGE *** ---"
echo -e "-----------------------------\n"
/etc/init.d/fdfs_storaged start
esac
tail -f /dev/null
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。