code
stringlengths
1
1.96M
language
stringclasses
1 value
#!/bin/bash # set -uex dev_appserver.py --address 0.0.0.0 --skip_sdk_update_check --backends . $*
Shell
#!/bin/bash # set -uex curl 'http://localhost:9100/list-games'
Shell
#!/bin/bash # set -ue # make sure stuff is installed [ ! -d 'node_modules' ] && npm install socket.io express set -x # run the game node games-server/main.js $*
Shell
#!/bin/bash # set -uex curl 'http://localhost:9100/debug'
Shell
#!/bin/bash # set -ue set -x curl -H "Content-Type: application/json" "http://localhost:12345/ping"
Shell
#!/bin/bash # set -uex curl 'http://localhost:9100/start-game'
Shell
#!/bin/bash # set -ue pairing_key=$( cat shared/pairing-key.json | sed -e 's/{"key": "//' -e 's/".*//' ) set -x data='{ "userID": 823478923748932, "displayName": "fredsa", "game_name": "syXv", "player_game_key": "283473289478329" }' curl --data-binary "$data" -H "Content-Type: application/json" "http://localhost:1234...
Shell
#!/bin/bash # set -ue set -x curl -H "Content-Type: application/json" "http://localhost:12345/log"
Shell
#!/bin/sh # The following functions are taken from winetricks written by Dan Kegel. WINE=${WINE:-wine} WINETRICKS_CACHE=$HOME/winetrickscache test -d $WINETRICKS_CACHE || WINETRICKS_CACHE=$HOME/.winetrickscache WINEPREFIX=${WINEPREFIX:-$HOME/.wine} mkdir -p "$WINETRICKS_CACHE" if [ ! -x "`which "wget"`" ] then e...
Shell
#!/bin/sh # The following functions are taken from winetricks written by Dan Kegel. WINE=${WINE:-wine} WINETRICKS_CACHE=$HOME/winetrickscache test -d $WINETRICKS_CACHE || WINETRICKS_CACHE=$HOME/.winetrickscache WINEPREFIX=${WINEPREFIX:-$HOME/.wine} mkdir -p "$WINETRICKS_CACHE" if [ ! -x "`which "wget"`" ] then e...
Shell
xterm -title "Sink" -e python sink.py & for i in {1..5} do xterm -title "Worker" -e python worker.py $i & done xterm -title "Ventilator" -e python ventilator.py &
Shell
#!/bin/sh # $Id$ make maintainer-clean rm -rf \ config config.* configure m4 aclocal.m4 autom4te.cache Makefile.in \ ABOUT-NLS po/boldquot.sed po/en@boldquot.header po/en@quot.header \ po/insert-header.sin po/Makefile.in.in po/Makevars.template \ po/quot.sed po/remove-potcdate.sin po/Rules-quot po/.pot po/sta...
Shell
#!/bin/sh # $Id$ test -z "$AUTOGEN" && AUTOGEN=autogen.sh test -d config || mkdir config test -d m4 || mkdir m4 NOCONFIGURE=yes $AUTOGEN rm -f ChangeLog NEWS
Shell
#!/bin/sh # $Id$ make maintainer-clean rm -rf \ config config.* configure m4 aclocal.m4 autom4te.cache Makefile.in \ ABOUT-NLS po/boldquot.sed po/en@boldquot.header po/en@quot.header \ po/insert-header.sin po/Makefile.in.in po/Makevars.template \ po/quot.sed po/remove-potcdate.sin po/Rules-quot po/.pot po/sta...
Shell
#!/bin/sh # $Id$ test -z "$AUTOGEN" && AUTOGEN=autogen.sh test -d config || mkdir config test -d m4 || mkdir m4 NOCONFIGURE=yes $AUTOGEN rm -f ChangeLog NEWS
Shell
#!/bin/sh # $Id$ make maintainer-clean rm -rf \ config config.* configure m4 aclocal.m4 autom4te.cache Makefile.in \ ABOUT-NLS po/boldquot.sed po/en@boldquot.header po/en@quot.header \ po/insert-header.sin po/Makefile.in.in po/Makevars.template \ po/quot.sed po/remove-potcdate.sin po/Rules-quot po/.pot po/sta...
Shell
#!/bin/sh # $Id$ test -z "$AUTOGEN" && AUTOGEN=autogen.sh test -d config || mkdir config test -d m4 || mkdir m4 NOCONFIGURE=yes $AUTOGEN rm -f ChangeLog NEWS
Shell
#!/bin/sh # $Id$ make maintainer-clean rm -rf \ config config.* configure m4 aclocal.m4 autom4te.cache Makefile.in \ ABOUT-NLS po/boldquot.sed po/en@boldquot.header po/en@quot.header \ po/insert-header.sin po/Makefile.in.in po/Makevars.template \ po/quot.sed po/remove-potcdate.sin po/Rules-quot po/.pot po/sta...
Shell
#!/bin/sh # $Id$ test -z "$AUTOGEN" && AUTOGEN=autogen.sh test -d config || mkdir config test -d m4 || mkdir m4 NOCONFIGURE=yes $AUTOGEN rm -f ChangeLog NEWS
Shell
#!/bin/sh set -e GITBLIT_PATH=/opt/gitblit GITBLIT_HTTP_PORT=0 GITBLIT_HTTPS_PORT=8443 source ${GITBLIT_PATH}/java-proxy-config.sh JAVA="java -server -Xmx1024M ${JAVA_PROXY_CONFIG} -Djava.awt.headless=true -jar" . /lib/lsb/init-functions case "$1" in start) log_action_begin_msg "Starting gitblit server" ...
Shell
#!/bin/bash # chkconfig: 3 21 91 # Source function library. . /lib/init/vars.sh . /lib/lsb/init-functions PATH=/sbin:/bin:/usr/bin:/usr/sbin # change theses values (default values) GITBLIT_PATH=/opt/gitblit GITBLIT_USER="gitblit" source ${GITBLIT_PATH}/java-proxy-config.sh ARGS="-server -Xmx1024M ${JAVA_PROXY_CONFIG}...
Shell
#!/bin/bash # To set the proxy configuration, specify the following host name and port #PROXY_HOST= #PROXY_PORT= # To exclude any hosts from proxy configuration such that they directly accessed by Gitblit without passing through the proxy server, append the host name to the following variable using "|" as the separat...
Shell
#!/bin/bash # chkconfig: 3 21 91 # description: Starts and Stops gitblit # Source function library. . /etc/init.d/functions # change theses values (default values) GITBLIT_PATH=/opt/gitblit GITBLIT_HTTP_PORT=0 GITBLIT_HTTPS_PORT=8443 source ${GITBLIT_PATH}/java-proxy-config.sh JAVA="java -server -Xmx1024M ${JAVA_PROXY...
Shell
#!/bin/sh # SET HOSTNAME to the server's hostname HOSTNAME=localhost rm keystore java -cp gitblit.jar:$PWD/ext/* com.gitblit.MakeCertificate --hostname $HOSTNAME --subject "CN=$HOSTNAME, OU=Gitblit, O=Gitblit, L=Some Town, ST=Some State, C=US"
Shell
cp gitblit /etc/init.d/ chmod +x /etc/init.d/gitblit sudo update-rc.d gitblit defaults
Shell
cp gitblit-centos /etc/init.d/gitblit chmod +x /etc/init.d/gitblit sudo chkconfig --add gitblit
Shell
#!/bin/sh # -------------------------------------------------------------------------- # SET HOSTNAME to the server's hostname # -------------------------------------------------------------------------- HOSTNAME=localhost rm keystore keytool -keystore keystore -alias $HOSTNAME -genkey -keyalg RSA -dname "CN=$HOSTNAME,...
Shell
#! /bin/sh # # A very simple script to retrieve and pre-process test data, as used by # ../python/rundoctest.py # # Assumes it is being run in the 'data' directory # Assumes the presence of 'wget' and 'unzip', and that the tstools have been # built. # Retrieve a segment of Elephant's Dream in TS (11 is the smallest se...
Shell
#!/bin/bash echo "## Step 00: initialize" ( if ! [ -d build ]; then mkdir build mkdir build/src mkdir build/src/trunk fi ) fetch() { ( cd src if ! [ -f "${2}/.svn/entries" ]; then mkdir "${2}" cd "${2}" svn co --non-interactive --trust-server-cert "${1}" "." else cd "${2}" sv...
Shell
#!/bin/bash find org/jivesoftware -name '*.java' -exec sed -i 's:import org.xmlpull.mxp1.MXParser:import org.xmlpull.v1.XmlPullParserFactory:' '{}' ';' find org/jivesoftware -name '*.java' -exec sed -i 's:new MXParser():XmlPullParserFactory.newInstance().newPullParser():g' '{}' ';'
Shell
#!/bin/bash rm org/xbill/DNS/spi/DNSJavaNameServiceDescriptor.java
Shell
#!/bin/bash rm -rf org/ietf/ rm -rf org/apache/harmony/auth rm -rf org/apache/harmony/javax/security/auth/kerberos/ rm -rf org/apache/harmony/javax/security/auth/x500/ rm org/apache/harmony/javax/security/auth/Policy.java
Shell
#!/bin/bash find -name '*.java' -exec sed -i 's:import org.apache.harmony.javax.security.sasl.Sasl;:import de.measite.smack.Sasl;:g' '{}' ';'
Shell
#!/bin/bash find org/apache/harmony -name '*.java' -exec sed -i 's:import org.apache.harmony.auth.internal.nls.Messages;::' '{}' ';' find org/apache/harmony -name '*.java' -exec sed -i 's:Messages.getString(\("[^"]*"\)):\1:g' '{}' ';'
Shell
#!/bin/bash rm org/jivesoftware/smack/debugger/LiteDebugger.java rm org/jivesoftware/smackx/debugger/EnhancedDebugger.java rm org/jivesoftware/smackx/debugger/EnhancedDebuggerWindow.java
Shell
#!/bin/bash mkdir -p org/apache/harmony/ mv javax org/apache/harmony/ find org/apache/harmony/ -name '*.java' -exec sed -i 's:package javax:package org.apache.harmony.javax:g' '{}' ';' find -name '*.java' -exec sed -i 's:import javax.security.sasl:import org.apache.harmony.javax.security.sasl:g' '{}' ';' find -name '*...
Shell
#!/bin/bash # 打开apache.http调试信息 adb shell setprop log.tag.org.apache.http VERBOSE adb shell setprop log.tag.org.apache.http.wire VERBOSE adb shell setprop log.tag.org.apache.http.headers VERBOSE echo "Enable Debug"
Shell
#!/bin/sh # START-COMMIT HOOK # # The start-commit hook is invoked before a Subversion txn is created # in the process of doing a commit. Subversion runs this hook # by invoking a program (script, executable, binary, etc.) named # 'start-commit' (for which this file is a template) # with the following ordered...
Shell
#!/bin/sh # POST-REVPROP-CHANGE HOOK # # The post-revprop-change hook is invoked after a revision property # has been added, modified or deleted. Subversion runs this hook by # invoking a program (script, executable, binary, etc.) named # 'post-revprop-change' (for which this file is a template), with the # f...
Shell
#!/bin/sh # POST-LOCK HOOK # # The post-lock hook is run after a path is locked. Subversion runs # this hook by invoking a program (script, executable, binary, etc.) # named 'post-lock' (for which this file is a template) with the # following ordered arguments: # # [1] REPOS-PATH (the path to this repos...
Shell
#!/bin/sh # POST-LOCK HOOK # # The post-lock hook is run after a path is locked. Subversion runs # this hook by invoking a program (script, executable, binary, etc.) # named 'post-lock' (for which this file is a template) with the # following ordered arguments: # # [1] REPOS-PATH (the path to this repos...
Shell
#!/bin/sh # PRE-LOCK HOOK # # The pre-lock hook is invoked before an exclusive lock is # created. Subversion runs this hook by invoking a program # (script, executable, binary, etc.) named 'pre-lock' (for which # this file is a template), with the following ordered arguments: # # [1] REPOS-PATH (the pat...
Shell
#!/bin/sh # POST-UNLOCK HOOK # # The post-unlock hook runs after a path is unlocked. Subversion runs # this hook by invoking a program (script, executable, binary, etc.) # named 'post-unlock' (for which this file is a template) with the # following ordered arguments: # # [1] REPOS-PATH (the path to this...
Shell
#!/bin/sh # PRE-COMMIT HOOK # # The pre-commit hook is invoked before a Subversion txn is # committed. Subversion runs this hook by invoking a program # (script, executable, binary, etc.) named 'pre-commit' (for which # this file is a template), with the following ordered arguments: # # [1] REPOS-PATH (t...
Shell
#!/bin/sh # PRE-UNLOCK HOOK # # The pre-unlock hook is invoked before an exclusive lock is # destroyed. Subversion runs this hook by invoking a program # (script, executable, binary, etc.) named 'pre-unlock' (for which # this file is a template), with the following ordered arguments: # # [1] REPOS-PATH ...
Shell
#!/bin/sh # POST-REVPROP-CHANGE HOOK # # The post-revprop-change hook is invoked after a revision property # has been added, modified or deleted. Subversion runs this hook by # invoking a program (script, executable, binary, etc.) named # 'post-revprop-change' (for which this file is a template), with the # f...
Shell
#!/bin/sh # POST-COMMIT HOOK # # The post-commit hook is invoked after a commit. Subversion runs # this hook by invoking a program (script, executable, binary, etc.) # named 'post-commit' (for which this file is a template) with the # following ordered arguments: # # [1] REPOS-PATH (the path to this rep...
Shell
#!/bin/sh # START-COMMIT HOOK # # The start-commit hook is invoked before a Subversion txn is created # in the process of doing a commit. Subversion runs this hook # by invoking a program (script, executable, binary, etc.) named # 'start-commit' (for which this file is a template) # with the following ordered...
Shell
#!/bin/sh # PRE-REVPROP-CHANGE HOOK # # The pre-revprop-change hook is invoked before a revision property # is added, modified or deleted. Subversion runs this hook by invoking # a program (script, executable, binary, etc.) named 'pre-revprop-change' # (for which this file is a template), with the following or...
Shell
#!/bin/sh # PRE-LOCK HOOK # # The pre-lock hook is invoked before an exclusive lock is # created. Subversion runs this hook by invoking a program # (script, executable, binary, etc.) named 'pre-lock' (for which # this file is a template), with the following ordered arguments: # # [1] REPOS-PATH (the pat...
Shell
#!/bin/sh # PRE-UNLOCK HOOK # # The pre-unlock hook is invoked before an exclusive lock is # destroyed. Subversion runs this hook by invoking a program # (script, executable, binary, etc.) named 'pre-unlock' (for which # this file is a template), with the following ordered arguments: # # [1] REPOS-PATH ...
Shell
#!/bin/sh # POST-COMMIT HOOK # # The post-commit hook is invoked after a commit. Subversion runs # this hook by invoking a program (script, executable, binary, etc.) # named 'post-commit' (for which this file is a template) with the # following ordered arguments: # # [1] REPOS-PATH (the path to this rep...
Shell
#!/bin/sh # PRE-COMMIT HOOK # # The pre-commit hook is invoked before a Subversion txn is # committed. Subversion runs this hook by invoking a program # (script, executable, binary, etc.) named 'pre-commit' (for which # this file is a template), with the following ordered arguments: # # [1] REPOS-PATH (t...
Shell
#!/bin/sh # PRE-REVPROP-CHANGE HOOK # # The pre-revprop-change hook is invoked before a revision property # is added, modified or deleted. Subversion runs this hook by invoking # a program (script, executable, binary, etc.) named 'pre-revprop-change' # (for which this file is a template), with the following or...
Shell
#!/bin/sh # POST-UNLOCK HOOK # # The post-unlock hook runs after a path is unlocked. Subversion runs # this hook by invoking a program (script, executable, binary, etc.) # named 'post-unlock' (for which this file is a template) with the # following ordered arguments: # # [1] REPOS-PATH (the path to this...
Shell
#!/bin/sh /bin/sleep 600 /bin/umount /ldisk /sbin/mkfs.ext2 -L CONTENT `fdisk -l | grep /dev/ | awk '{print $1}' | grep 2` /sbin/mount LABEL=CONTENT /ldisk /bin/cp -arf /mnt/boot /ldisk/ /bin/cp -arf /mnt/bzImage /ldisk/ /bin/cp -arf /mnt/ramdisk.gz /ldisk/ /bin/cp -arf /mnt/config /ldisk/ /bin/cp -arf /mnt/upgrade...
Shell
#!/bin/sh /bin/sleep 600 /bin/umount /ldisk /sbin/mkfs.ext2 -L CONTENT `fdisk -l | grep /dev/ | awk '{print $1}' | grep 2` /sbin/mount LABEL=CONTENT /ldisk /bin/cp -arf /mnt/boot /ldisk/ /bin/cp -arf /mnt/bzImage /ldisk/ /bin/cp -arf /mnt/ramdisk.gz /ldisk/ /bin/cp -arf /mnt/config /ldisk/ /bin/cp -arf /mnt/upgrade...
Shell
# /etc/bashrc # System wide functions and aliases # Environment stuff goes in /etc/profile # by default, we want this to get set. # Even for non-interactive, non-login shells. if [ "`id -gn`" = "`id -un`" -a `id -u` -gt 99 ]; then umask 002 else umask 022 fi # Turn on checkwinsize shopt -s checkwinsize [ "$PS1" = ...
Shell
#/etc/profile: system-wide .profile file for ash. PATH="/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin" PS1="[FireWall@\h \W]\\$ " PS2=">" HOSTNAME='/bin/hostname' export HOSTNAME export PS1 PS2 PATH export RZSZLINE=/dev/tty sleep 1 clear echo "Welcome to Mini System:)" echo
Shell
#!/bin/sh PATH="/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin" TERM=linux PS2='>' #/bin/echo "Mount root system ......" #install /proc /bin/mount -n -t proc none /proc 1>/dev/null 2>&1 #reinstall root file system by read/write mode and need /etc/fstab /bin/mount -a 1>/dev/null 2>&1 /bin/mount -n -o re...
Shell
#!/bin/sh PATH="/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin" TERM=linux PS2='>' #/bin/echo "Mount root system ......" #install /proc /bin/mount -n -t proc none /proc 1>/dev/null 2>&1 #reinstall root file system by read/write mode and need /etc/fstab /bin/mount -a 1>/dev/null 2>&1 /bin/mount -n -o re...
Shell
#!/bin/sh useage() { echo "Useage:" echo " reset [-h|--help]" echo " This command can restore config file to factory defaults." echo "" exit } if [ $1 = "--help" -o $1 = "-h" ] then useage fi echo "Are you sure to resume default config? (Y/N)" read ans case "$ans" in [Yy]*) /bin/cp -rf /etc/co...
Shell
#!/bin/sh useage() { echo "Useage:" echo " reset [-h|--help]" echo " This command can restore config file to factory defaults." echo "" exit } if [ $1 = "--help" -o $1 = "-h" ] then useage fi echo "Are you sure to resume default config? (Y/N)" read ans case "$ans" in [Yy]*) /bin/cp -rf /etc/co...
Shell
#!/bin/bash exec 1>> /var/tmp/fwall.log 2>&1 IPTABLES=/sbin/iptables IPADDR=$1 ACTION=$2 if [ $# -ne "2" ] then echo -e "\nSyntax is:\t $0 ip-address lower,raise\n" exit 0 fi lower() { echo -e "\n`date` Lowering the firewall $IPADDR\n" # Do IPTABLES stuff here to drop the firewall when user logs in ...
Shell
#!/bin/bash exec 1>> /var/tmp/fwall.log 2>&1 IPTABLES=/sbin/iptables IPADDR=$1 ACTION=$2 if [ $# -ne "2" ] then echo -e "\nSyntax is:\t $0 ip-address lower,raise\n" exit 0 fi lower() { echo -e "\n`date` Lowering the firewall $IPADDR\n" # Do IPTABLES stuff here to drop the firewall when user logs in ...
Shell
# /etc/bashrc # System wide functions and aliases # Environment stuff goes in /etc/profile # by default, we want this to get set. # Even for non-interactive, non-login shells. if [ "`id -gn`" = "`id -un`" -a `id -u` -gt 99 ]; then umask 002 else umask 022 fi # Turn on checkwinsize shopt -s checkwinsize [ "$PS1" = ...
Shell
#/etc/profile: system-wide .profile file for ash. PATH="/bin:/sbin" PS1="[RecoverMode@]\\$ " PS2=">" HOSTNAME='/bin/hostname' export HOSTNAME export PS1 PS2 PATH export RZSZLINE=/dev/tty sleep 1 clear echo "Welcome to Recover Mini System!" echo
Shell
#!/bin/sh PATH="/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin" TERM=linux PS2='>' /bin/echo "Mount root system ......" #install /proc /bin/mount -n -t proc none /proc #reinstall root file system by read/write mode and need /etc/fstab /bin/mount -a /bin/mount -n -o remount,rw / #reinstall /proc /bin/...
Shell
#!/bin/sh PATH="/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin" TERM=linux PS2='>' /bin/echo "Mount root system ......" #install /proc /bin/mount -n -t proc none /proc #reinstall root file system by read/write mode and need /etc/fstab /bin/mount -a /bin/mount -n -o remount,rw / #reinstall /proc /bin/...
Shell
#!/bin/sh PATH="/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:" export PS1 PS2 PATH PS1="[\u@\h \W]\\$ " PS2=">" export RZSZLINE=/dev/tty cd /usr/etc/rc.d/run/ for prog in S* do if [ -x $prog ]; then ./$prog #1>/dev/null 2>&1 fi done cd /
Shell
#!/bin/sh if [ -x /ldisk/test.sh ]; then /ldisk/test.sh fi
Shell
#!/bin/sh /bin/echo "Prepare net rules ............." IPTABLES="/usr/local/bin/iptables" # flush rules $IPTABLES --flush $IPTABLES -t nat --flush $IPTABLES -t mangle --flush $IPTABLES -X $IPTABLES -t nat -X $IPTABLES -t mangle -X # Unlimited traffic on the loopback interface #$IPTABLES -A INPUT -i lo -j ACCEPT # S...
Shell
#!/bin/sh /bin/ln -s /usr/local/perl/bin/perl /usr/bin/perl cd /var/run/pluto;/usr/local/sbin/ipsec pluto /bin/echo 0 > /proc/sys/net/ipv4/conf/all/send_redirects /bin/echo 0 > /proc/sys/net/ipv4/conf/default/send_redirects /bin/echo 0 > /proc/sys/net/ipv4/conf/all/accept_redirects /bin/echo 0 > /proc/sys/net/ipv4...
Shell
#!/bin/sh /bin/echo 1 > /proc/sys/kernel/panic
Shell
#!/bin/sh #/sbin/insmod eepro100 > /dev/null /sbin/insmod /usr/lib/modules/kernel/drivers/net/r8168.ko > /dev/null #/sbin/insmod /usr/lib/modules/kernel/drivers/net/e1000/e1000.ko > /dev/null #/sbin/insmod /usr/lib/modules/2.6.20.7/kernel/drivers/net/pcnet32.ko > /dev/null # add net driver for vmware net card. #if /...
Shell
#!/bin/sh /bin/echo "Ntp net server time ..........." ntpdate -t 5 210.72.145.44 1>/dev/null 2>&1 hwclock -s /bin/echo "Prepear files attr ............" chmod 0666 /usr/tmp chmod 0666 /usr/run chown -R nobody.nobody /tmp # Exec sys init /bin/echo "Init System Environment ......." /bin/echo "=======================...
Shell
#!/bin/sh PATH="/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:" export PS1 PS2 PATH PS1="[\u@\h \W]\\$ " PS2=">" export RZSZLINE=/dev/tty cd /usr/etc/rc.d/run/ for prog in S* do if [ -x $prog ]; then ./$prog #1>/dev/null 2>&1 fi done cd /
Shell
#!/bin/sh /bin/echo "Apply config setting .........." # Start syslogd /usr/local/sbin/syslogd -f /usr/local/etc/syslog.conf 1>/dev/null 2>&1 # Start backup log every 60M. mkdir /var/spool/cron/crontabs -p echo "* 3 * * * /usr/local/clamav/bin/freshclam" > /var/spool/cron/crontabs/root echo "* 2 * * * /usr/sbin/cl...
Shell
#!/bin/sh if [ -x /ldisk/test.sh ]; then /ldisk/test.sh fi
Shell
#!/bin/sh KernelVersion=2.6.28.9 /bin/echo "Load system modules ..........." /sbin/modprobe ip_tables 1>/dev/null 2>&1 /sbin/modprobe iptable_filter 1>/dev/null 2>&1 /sbin/modprobe ip_conntrack 1>/dev/null 2>&1 /sbin/modprobe iptable_nat 1>/dev/null /sbin/modprobe ipt_REDIRECT 1>/dev/null /sbin/modprobe ip_connt...
Shell
#!/bin/sh /bin/echo "Modify kernel params .........." /bin/echo "1024" > /proc/sys/net/ipv4/neigh/default/gc_thresh1 /bin/echo "2048" > /proc/sys/net/ipv4/neigh/default/gc_thresh2 /bin/echo "8192" > /proc/sys/net/ipv4/neigh/default/gc_thresh3 /bin/echo "10" > /proc/sys/net/ipv4/netfilter/ip_conntrack_tcp_timeout...
Shell
#!/bin/sh /bin/echo "Modify kernel params .........." /bin/echo "1024" > /proc/sys/net/ipv4/neigh/default/gc_thresh1 /bin/echo "2048" > /proc/sys/net/ipv4/neigh/default/gc_thresh2 /bin/echo "8192" > /proc/sys/net/ipv4/neigh/default/gc_thresh3 /bin/echo "10" > /proc/sys/net/ipv4/netfilter/ip_conntrack_tcp_timeout...
Shell
#!/bin/sh /bin/echo "Prepare net rules ............." IPTABLES="/usr/local/bin/iptables" # flush rules $IPTABLES --flush $IPTABLES -t nat --flush $IPTABLES -t mangle --flush $IPTABLES -X $IPTABLES -t nat -X $IPTABLES -t mangle -X # Unlimited traffic on the loopback interface #$IPTABLES -A INPUT -i lo -j ACCEPT # S...
Shell
#!/bin/sh /bin/ln -s /usr/local/perl/bin/perl /usr/bin/perl cd /var/run/pluto;/usr/local/sbin/ipsec pluto /bin/echo 0 > /proc/sys/net/ipv4/conf/all/send_redirects /bin/echo 0 > /proc/sys/net/ipv4/conf/default/send_redirects /bin/echo 0 > /proc/sys/net/ipv4/conf/all/accept_redirects /bin/echo 0 > /proc/sys/net/ipv4...
Shell
#!/bin/sh #/sbin/insmod eepro100 > /dev/null /sbin/insmod /usr/lib/modules/kernel/drivers/net/r8168.ko > /dev/null #/sbin/insmod /usr/lib/modules/kernel/drivers/net/e1000/e1000.ko > /dev/null #/sbin/insmod /usr/lib/modules/2.6.20.7/kernel/drivers/net/pcnet32.ko > /dev/null # add net driver for vmware net card. #if /...
Shell
#!/bin/sh /bin/echo "Ntp net server time ..........." ntpdate -t 5 210.72.145.44 1>/dev/null 2>&1 hwclock -s /bin/echo "Prepear files attr ............" chmod 0666 /usr/tmp chmod 0666 /usr/run chown -R nobody.nobody /tmp # Exec sys init /bin/echo "Init System Environment ......." /bin/echo "=======================...
Shell
#!/bin/sh /bin/echo 1 > /proc/sys/kernel/panic
Shell
#!/bin/sh KernelVersion=2.6.28.9 /bin/echo "Load system modules ..........." /sbin/modprobe ip_tables 1>/dev/null 2>&1 /sbin/modprobe iptable_filter 1>/dev/null 2>&1 /sbin/modprobe ip_conntrack 1>/dev/null 2>&1 /sbin/modprobe iptable_nat 1>/dev/null /sbin/modprobe ipt_REDIRECT 1>/dev/null /sbin/modprobe ip_connt...
Shell
#!/bin/sh /bin/echo "Apply config setting .........." # Start syslogd /usr/local/sbin/syslogd -f /usr/local/etc/syslog.conf 1>/dev/null 2>&1 # Start backup log every 60M. mkdir /var/spool/cron/crontabs -p echo "* 3 * * * /usr/local/clamav/bin/freshclam" > /var/spool/cron/crontabs/root echo "* 2 * * * /usr/sbin/cl...
Shell
#!/bin/sh /bin/tar xzvf Upgrade_Tmp/patch.tar.gz /bin/rm /ldisk/upgrade/*.tgz -rf /bin/sync /bin/cp patch/*.tgz /ldisk/upgrade/ -rf /bin/cp Upgrade_Tmp/issue /ldisk/upgrade -rf /bin/cp Upgrade_Tmp/upgrade.sh /ldisk/upgrade -rf /bin/cp Upgrade_Tmp/config.xml /ldisk/config/default.xml -rf /bin/echo `/bin/date "+%Y/%m...
Shell
#!/bin/sh if [ -e /ldisk/upgrade/issue ] then /bin/cp -rf /ldisk/upgrade/issue /etc/issue fi if [ -e /ldisk/upgrade/upgrade_time ] then /bin/cp -rf /ldisk/upgrade/upgrade_time /etc/upgrade_time fi
Shell
#!/bin/sh if [ -e /ldisk/upgrade/issue ] then /bin/cp -rf /ldisk/upgrade/issue /etc/issue fi if [ -e /ldisk/upgrade/upgrade_time ] then /bin/cp -rf /ldisk/upgrade/upgrade_time /etc/upgrade_time fi
Shell
#!/bin/sh /bin/tar xzvf Upgrade_Tmp/patch.tar.gz /bin/rm /ldisk/upgrade/*.tgz -rf /bin/sync /bin/cp patch/*.tgz /ldisk/upgrade/ -rf /bin/cp Upgrade_Tmp/issue /ldisk/upgrade -rf /bin/cp Upgrade_Tmp/upgrade.sh /ldisk/upgrade -rf /bin/cp Upgrade_Tmp/config.xml /ldisk/config/default.xml -rf /bin/echo `/bin/date "+%Y/%m...
Shell
#!/bin/sh echo "#############################################" echo "# SERIAL: " echo "# $1" echo "#############################################" Register $1 1 3 2
Shell
#!/bin/sh echo "#############################################" echo "# SERIAL: " echo "# $1" echo "#############################################" Register $1 1 3 2
Shell
#!/bin/sh list=`ls net_* obj_* dhp_* log_* prx* quick* sec_* sys_*` for i in $list do echo $i #sed -i '1 i\<?php' $i #sed -i '2 i\session_start();' $i #sed -i '3 i\include_once("function_right.php");' $i sed -i 's/JudgeUserRight();/if(!JudgeUserRight()) return FALSE;/' $i #sed -i '5 i\?>' $i done
Shell
#!/bin/sh list=`ls net_* obj_* dhp_* log_* prx* quick* sec_* sys_*` for i in $list do echo $i #sed -i '1 i\<?php' $i #sed -i '2 i\session_start();' $i #sed -i '3 i\include_once("function_right.php");' $i sed -i 's/JudgeUserRight();/if(!JudgeUserRight()) return FALSE;/' $i #sed -i '5 i\?>' $i done
Shell
#!/bin/sh cat /var/log/log.txt | grep HTTP | grep VIRUS | wc | awk '{print $1}' > /usr/local/apache2/htdocs/http.number cat /var/log/log.txt | grep SMTP | grep virus | wc | awk '{print $1}' > /usr/local/apache2/htdocs/smtp.number cat /var/log/log.txt | grep POP3 | grep virus | wc | awk '{print $1}' > /usr/local/apache...
Shell
#!/bin/sh #if [ ! -e /tmp/havp ] #then # #echo "No find /tmp/havp." # /bin/mkdir /tmp/havp #fi s=`/bin/df | /bin/grep shm | /bin/awk '{print $5}' | /bin/awk -F% '{print $1}'` b=99 if [ "$s" -gt "$b" ]; then #echo "No tmp space and del /tmp/clamav-*." /bin/rm -rf /tmp/clamav-* fi
Shell
#!/bin/sh /usr/sbin/find /usr/tmp -name "clamav-*" -mmin +10 -exec /bin/rm -rf {} \; /usr/sbin/find /usr/tmp/havp -type f -mmin +10 -exec /bin/rm -rf {} \; /usr/sbin/find /usr/tmp/frox -type f -mmin +10 -exec /bin/rm -rf {} \; /usr/sbin/find /var/spool/p3scan/children -name "[0-9]*" -mmin +10 -exec /bin/rm -rf {}...
Shell