If the file or directory has extended attributes, the permissions field printed by the -l option is followed by a ‘@’ character. Otherwise, if the file or directory has extended secu- rity information, the permissions field printed by the -l option is fol- lowed by a ‘+’ character.
# 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好用啊!