opt/apache-tomcat/pre-install

13 lines
200 B
Plaintext
Raw Normal View History

#!/bin/sh
gr=`grep tomcat /etc/group`
if [ "$gr" = "" ]; then
groupadd tomcat
fi
us=`grep tomcat /etc/passwd`
if [ "$us" = "" ]; then
useradd -s /bin/bash -g tomcat tomcat
passwd -l tomcat
fi