国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 開發 > Linux Shell > 正文

script_tool_for_linux.bash: Linux 環境下的 hosts 一鍵部署腳本

2020-07-27 19:02:38
字體:
來源:轉載
供稿:網友

Linux 環境下的 hosts 一鍵部署腳本,由 @lstoars 貢獻; @fluviusmagnus 提供增強版本。

官方網站:https://github.com/racaljk/hosts/tree/master/hosts_tools

#!/bin/sh## script_tool_for_linux## Use command: `sudo sh script_tool_for_linux.sh` or#    `su -c 'sh script_tool_for_linux.sh'`# to update your hosts file.## WARNING: the script CAN NOT replace others' hosts rules.#   If you have hosts rules provided by others, you may get conflict.#if [ `id -u` -eq 0 ]; then curl -fLo /tmp/fetchedhosts 'https://raw.githubusercontent.com/racaljk/hosts/master/hosts' sed -i '/# Copyright (c) 2014/,/# Modified hosts end/d' /etc/hosts sed -i "s/localhost/`hostname`/g" /tmp/fetchedhosts cat /tmp/fetchedhosts >> /etc/hosts rm -f /tmp/fetchedhosts echo 'Success.'else echo 'Permission denied, are you root?'fi

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 富源县| 深水埗区| 宁蒗| 登封市| 汉沽区| 罗平县| 娱乐| 奈曼旗| 忻州市| 阜新市| 辽阳市| 扶风县| 鹰潭市| 离岛区| 安顺市| 阿拉善右旗| 漳平市| 九寨沟县| 林州市| 宁强县| 海林市| 金堂县| 墨江| 山西省| 漯河市| 互助| 牡丹江市| 宣汉县| 新野县| 平江县| 白银市| 永嘉县| 景泰县| 镇雄县| 龙口市| 临沂市| 澄迈县| 黎平县| 阿克| 武山县| 玉门市|