This file contains 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
usage() { | |
echo "引数を入力" | |
} | |
if [ -z "$1" ] | |
then | |
usage | |
exit 0 | |
fi |
This file contains 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 | |
port=9999 | |
while true | |
do | |
http_status=`curl -LI localhost:$port/health_check -o /dev/null -w '%{http_code}\n' -s` | |
if [ "$http_status" == "200" ]; then | |
break | |
fi |
This file contains 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 | |
set -e | |
lockfile=${TMP:-/tmp}/${0##*/} | |
i=1 | |
while [ $i -eq 1 ]; do | |
if [ ! -e $lockfile ]; then | |
i=`expr $i + 1` |
This file contains 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 | |
ROOT=$(cd $(dirname "$0") && pwd) | |
echo $ROOT |
This file contains 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 | |
set -e | |
if [ $# -ne 2 ]; then | |
echo "指定された引数は$#個です。" 1>&2 | |
echo "実行するには比較するファイル名を引数1と2に入力してください。" 1>&2 | |
exit 1 | |
fi |
This file contains 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 | |
i=1 | |
end=15 | |
ip="192.168.0." | |
svrstr=astel | |
end=`expr $end + 1` | |
while [ $i -lt $end ]; do | |
if [ $i -lt 10 ]; then |
This file contains 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 | |
ether-wake -i eth0 xx:xx:xx:xx:xx:xx | |
hostip=192.168.0.xx | |
set -eu | |
i=0 | |
while true |
This file contains 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 | |
# zabbixのスクリーンにインポートするxmlをつくるシェルスクリプト。 | |
# 完全に自分用 いらなそうな処理もあるけど。 | |
# zabbix2.2 | |
# 100台以上の想定はしてない(そもそもその数をスクリーンで見ると重い) | |
# $ sh zbx_screen.sh > out.xml でxmlをインポートする。 | |
host_name="astel00" | |
server_number=42 |
This file contains 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 | |
#メインPCに動画を送ってエンコードさせるスクリプト。 | |
#video_dirに保存している.ts動画を全てエンコードする。 | |
#メインPCがついていなかった場合、WOLで起動させる。 | |
#エンコードした動画名はDBにinsertする。 | |
#エンコードした動画はowncloudのディレクトリに移動させる。 | |
#ssh i7でメインpcにsshできるようにしておく。 | |
#DB設定などは最終行に記述。 |
This file contains 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 | |
if [ $$ != `pgrep -fo $0` ]; then | |
echo `basename $0` is already running. | |
exit 1 | |
fi |
OlderNewer