# tomcat-launchd.sh # # Wrapper script that starts Tomcat and waits for the Tomcat process # to exit. This is needed for proper interaction with launchd.
# NOTE: We are inheriting CATALINA_HOME from launchd, because its value # was defined in the launchd plist configuration file.
functionshutdown() { # Bye Tomcat! echo "Shutting down Tomcat... " $CATALINA_HOME/bin/catalina.sh stop echo "done." # Cleaning up the temporary file rm -f $CATALINA_PID }
functionstartup() { # Define the file where we want the Tomcat process ID to be stored. export CATALINA_PID=$(mktemp /tmp/\`basename -s .sh $0\`.XXXXXX) if \[ $? -ne 0 \] then echo "$0: Failed to create temporary file. Aborting." exit 1 fi rm -f $CATALINA_PID # Let's go! echo "Starting up Tomcat... " . $CATALINA_HOME/bin/catalina.sh start # Register the shutdown function as callback to execute when a signal # is sent to this process. #捕捉以下信号使tomcat关闭 trap shutdown HUP INT QUIT ABRT KILL ALRM TERM TSTP echo "done." } function wait_for_tomcat_to_exit() { echo "Waiting for Tomcat to exit (PID: \`cat $CATALINA_PID\`)... " #等待tomcat进程退出 wait \`cat $CATALINA_PID\` echo "done waiting for Tomcat to exit." } #--------------------------------------------------------- # Let's go #--------------------------------------------------------- startup wait_for_tomcat_to_exit
mac os x咋这样尼,想让用户登录时执行一个脚本,写到 /.profile里竟然不执行,你默认的shell是bash啊,亲!然后需要各种方法执行一个用户登录脚本,麻烦死了,最后将登录脚本丢到login items里面,也勾选了hide选项,登录时竟然还有一个shell窗口一闪而过。 还有啊,打开非登录交互式终端竟然也不执行/.bashrc,你这是bash吗???幸好~/.bash_profile还会被执行,完全不如linux好用啊!
remote: error: By default, deleting the current branch is denied, because the next remote: error: ‘git clone’ won’t result in any file checked out, causing confusion. remote: error: remote: error: You can set ‘receive.denyDeleteCurrent’ configuration variable to remote: error: ‘warn’ or ‘ignore’ in the remote repository to allow deleting the remote: error: current branch, with or without a warning message. remote: error: remote: error: To squelch this message, you can set it to ‘refuse’. remote: error: refusing to delete the current branch: refs/heads/foobar To cisvr:/reis.git ! [remote rejected] foobar (deletion of the current branch prohibited) error: failed to push some refs to ‘cisvr:/reis.git’