This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
name="shell-script" | |
now=`/bin/date` | |
echo "Starting at ${now}." | |
LOCKFILE="/var/run/${name}.lock" | |
if [ -f ${LOCKFILE} ] | |
then |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# --zero-speed=1000000000 for 1000Mbps | |
# --zero-speed=100000000 for 100Mbps | |
cfgmaker --snmp-options=:::::2 --global "WorkDir: /usr/local/www/data/html/mrtg/172.16.1.1" --global "Options[_]: growright, bits" --global "Language: big5" --global 'AddHead[_]:<script type="text/javascript" src="//jal.tw/google_analytics.js"></script>' --zero-speed=1000000000 --show-op-down --if-filter='$if_type!=1 && $if_type!=53 && $if_type!=24 && $if_type!=131 && $if_type!=135 && $if_type!=136 && $if_type!=137 && $if_type!=142 && $if_type!=150 && $if_type!=217 && $if_type!=218 && $if_type!=222 && $if_type!=223' community_readonly@172.16.1.1 --output=172.16.1.1.cfg | |
# -i in-place edit, only work for GNU sed, not portable.(直接改原始檔案,僅支援 GNU sed,跨平台有可能會失效) | |
/usr/bin/sed -i '' -e 's/iso-8859-15/big5/g' */*/index.html | |
/usr/bin/sed -i '' -e '/Command line/d' */*/index.html | |
/usr/bin/sed -i '' -e '/Command-Line/d' */*/index.html | |
/usr/bin/sed -i '' -e '/commandline/d' */*/index.html | |
/usr/bin/sed -i '' -e '/HTTP-EQUIV="Expires"/d' */*/index |
NewerOlder