#!/bin/sh LSINSTALL_DIR=`dirname "$0"` cd $LSINSTALL_DIR LSINSTALL_DIR=`pwd` BASE_DIR=`dirname $LSINSTALL_DIR` BASE_DIR=`dirname $BASE_DIR` cd / INST_USER=`id` INST_UID=`expr "$INST_USER" : 'uid=\(.*\)(.*) gid=.*'` INST_USER=`expr "$INST_USER" : 'uid=.*(\(.*\)) gid=.*'` if [ $INST_UID != "0" ]; then DIR_OWN=`ls -ld $BASE_DIR | awk '{print $3}'` if [ "x$DIR_OWN" != "x$INST_USER" ]; then echo "[ERROR] You do not have the permission to uninstall LiteSpeed web server!" exit 1 fi fi cat<