--- a/dist/install.sh +++ b/dist/install.sh @@ -35,12 +35,12 @@ fi if [ "x$OS" = "xLinux" ] ; then - if [ "x$OSTYPE" != "x64" ] ; then - $DLCMD $LSWS_HOME/admin/fcgi-bin/admin_php http://www.litespeedtech.com/packages/lsphp5_bin/i386/lsphp5 - else - $DLCMD $LSWS_HOME/admin/fcgi-bin/admin_php http://www.litespeedtech.com/packages/lsphp5_bin/x86_64/lsphp5 - fi + # if [ "x$OSTYPE" != "x64" ] ; then + # $DLCMD $LSWS_HOME/admin/fcgi-bin/admin_php http://www.litespeedtech.com/packages/lsphp5_bin/i386/lsphp5 + # else + ln -s /usr/bin/lsphp7 $LSWS_HOME/admin/fcgi-bin/admin_php + if [ $? = 0 ] ; then HASADMINPHP=y echo "admin_php downloaded." @@ -473,23 +473,23 @@ fi #compress_admin_file - if [ ! -f "$LSWS_HOME/admin/conf/jcryption_keypair" ]; then - $LSWS_HOME/admin/misc/create_admin_keypair.sh - fi + # if [ ! -f "$LSWS_HOME/admin/conf/jcryption_keypair" ]; then + # $LSWS_HOME/admin/misc/create_admin_keypair.sh + # fi - chown "$CONF_OWN" "$LSWS_HOME/admin/conf/jcryption_keypair" - chmod 0600 "$LSWS_HOME/admin/conf/jcryption_keypair" + # chown "$CONF_OWN" "$LSWS_HOME/admin/conf/jcryption_keypair" + # chmod 0600 "$LSWS_HOME/admin/conf/jcryption_keypair" - chown "$CONF_OWN" "$LSWS_HOME/admin/conf/htpasswd" - chmod 0600 "$LSWS_HOME/admin/conf/htpasswd" + # chown "$CONF_OWN" "$LSWS_HOME/admin/conf/htpasswd" + # chmod 0600 "$LSWS_HOME/admin/conf/htpasswd" #for root user, we'll try to start it automatically INST_USER=`id` INST_USER=`expr "$INST_USER" : 'uid=.*(\(.*\)) gid=.*'` - if [ $INST_USER = "root" ]; then - $LSWS_HOME/admin/misc/rc-inst.sh - fi + # if [ $INST_USER = "root" ]; then + # $LSWS_HOME/admin/misc/rc-inst.sh + # fi echo "PIDFILE=$PID_FILE" > "$LSWS_HOME/bin/lsws_env" echo "GRACEFUL_PIDFILE=$DEFAULT_TMP_DIR/graceful.pid" >> "$LSWS_HOME/bin/lsws_env" --- a/dist/functions.sh +++ b/dist/functions.sh @@ -399,7 +399,7 @@ if [ $INST_USER = "root" ]; then if [ $SUCC -eq "1" ]; then - chown -R "$DIR_OWN" "$LSWS_HOME" + : #chown -R "$DIR_OWN" "$LSWS_HOME" fi fi } @@ -649,7 +649,7 @@ if [ ! -d "$LSWS_HOME/$arg" ]; then mkdir "$LSWS_HOME/$arg" fi - chown "$OWNER" "$LSWS_HOME/$arg" + #chown "$OWNER" "$LSWS_HOME/$arg" chmod $PERM "$LSWS_HOME/$arg" done @@ -666,7 +666,7 @@ do if [ -f "$LSINSTALL_DIR/$arg" ]; then cp -f "$LSINSTALL_DIR/$arg" "$LSWS_HOME/$arg" - chown "$OWNER" "$LSWS_HOME/$arg" + #chown "$OWNER" "$LSWS_HOME/$arg" chmod $PERM "$LSWS_HOME/$arg" fi done @@ -685,7 +685,7 @@ cp "$LSINSTALL_DIR/$arg" "$LSWS_HOME/$arg" fi if [ -f "$LSWS_HOME/$arg" ]; then - chown "$OWNER" "$LSWS_HOME/$arg" + #chown "$OWNER" "$LSWS_HOME/$arg" chmod $PERM "$LSWS_HOME/$arg" fi done @@ -701,7 +701,7 @@ for arg do cp -R "$LSINSTALL_DIR/$arg/"* "$LSWS_HOME/$arg/" - chown -R "$OWNER" "$LSWS_HOME/$arg/"* + #chown -R "$OWNER" "$LSWS_HOME/$arg/"* #chmod -R $PERM $LSWS_HOME/$arg/* done } @@ -728,7 +728,7 @@ for arg do cp -R "$LSINSTALL_DIR/$arg/"* "$LSWS_HOME/$arg.$VERSION/" - chown -R "$OWNER" "$LSWS_HOME/$arg.$VERSION" + #chown -R "$OWNER" "$LSWS_HOME/$arg.$VERSION" $TEST_BIN -L "$LSWS_HOME/$arg" if [ $? -eq 0 ]; then rm -f "$LSWS_HOME/$arg" @@ -750,7 +750,7 @@ for arg do cp -f "$LSINSTALL_DIR/$arg" "$LSWS_HOME/$arg.$VERSION" - chown "$OWNER" "$LSWS_HOME/$arg.$VERSION" + #chown "$OWNER" "$LSWS_HOME/$arg.$VERSION" chmod $PERM "$LSWS_HOME/$arg.$VERSION" $TEST_BIN -L "$LSWS_HOME/$arg" if [ $? -eq 0 ]; then @@ -767,7 +767,7 @@ umask 022 if [ $INST_USER = "root" ]; then SDIR_OWN="root:$ROOTGROUP" - chown $SDIR_OWN $LSWS_HOME + #chown $SDIR_OWN $LSWS_HOME else SDIR_OWN=$DIR_OWN fi @@ -782,7 +782,7 @@ if [ ! -f "$LSWS_HOME/$arg" ]; then cp "$LSINSTALL_DIR/$arg" "$LSWS_HOME/$arg" fi - chown "$OWNER" "$LSWS_HOME/$arg" + #chown "$OWNER" "$LSWS_HOME/$arg" chmod $PERM "$LSWS_HOME/$arg" done } @@ -797,7 +797,7 @@ for arg do cp -R "$LSINSTALL_DIR/$arg/"* "$LSWS_HOME/$arg/" - chown -R "$OWNER" "$LSWS_HOME/$arg/"* + #chown -R "$OWNER" "$LSWS_HOME/$arg/"* #chmod -R $PERM $LSWS_HOME/$arg/* done } @@ -816,7 +816,7 @@ do if [ -d "$LSINSTALL_DIR/$arg" ]; then cp -R "$LSINSTALL_DIR/$arg/"* "$LSWS_HOME/$arg.$VERSION/" - chown -R "$OWNER" "$LSWS_HOME/$arg.$VERSION" + #chown -R "$OWNER" "$LSWS_HOME/$arg.$VERSION" $TEST_BIN -L "$LSWS_HOME/$arg" if [ $? -eq 0 ]; then rm -f "$LSWS_HOME/$arg" @@ -841,7 +841,7 @@ if [ -f "$LSINSTALL_DIR/$arg" ]; then cp -f "$LSINSTALL_DIR/$arg" "$LSWS_HOME/$arg.$VERSION" - chown "$OWNER" "$LSWS_HOME/$arg.$VERSION" + #chown "$OWNER" "$LSWS_HOME/$arg.$VERSION" chmod $PERM "$LSWS_HOME/$arg.$VERSION" $TEST_BIN -L "$LSWS_HOME/$arg" if [ $? -eq 0 ]; then @@ -873,11 +873,11 @@ create_lsadm() { - groupadd lsadm + #groupadd lsadm #1>/dev/null 2>&1 lsadm_gid=`grep "^lsadm:" /etc/group | awk -F : '{ print $3; }'` - useradd -g $lsadm_gid -d / -r -s /sbin/nologin lsadm - usermod -a -G $WS_GROUP lsadm + #useradd -g $lsadm_gid -d / -r -s /sbin/nologin lsadm + #usermod -a -G $WS_GROUP lsadm #1>/dev/null 2>&1 } @@ -954,14 +954,14 @@ fi SDIR_OWN="root:$ROOTGROUP" LOGDIR_OWN="root:$WS_GROUP" - chown $SDIR_OWN $LSWS_HOME + #chown $SDIR_OWN $LSWS_HOME else SDIR_OWN=$DIR_OWN LOGDIR_OWN=$DIR_OWN fi - sed "s:%LSWS_CTRL%:$LSWS_HOME/bin/lswsctrl:" "$LSINSTALL_DIR/admin/misc/lsws.rc.in" > "$LSINSTALL_DIR/admin/misc/lsws.rc" - sed "s:%LSWS_CTRL%:$LSWS_HOME/bin/lswsctrl:" "$LSINSTALL_DIR/admin/misc/lsws.rc.gentoo.in" > "$LSINSTALL_DIR/admin/misc/lsws.rc.gentoo" - sed "s:%LSWS_CTRL%:$LSWS_HOME/bin/lswsctrl:" "$LSINSTALL_DIR/admin/misc/lshttpd.service.in" > "$LSINSTALL_DIR/admin/misc/lshttpd.service" + #sed "s:%LSWS_CTRL%:$LSWS_HOME/bin/lswsctrl:" "$LSINSTALL_DIR/admin/misc/lsws.rc.in" > "$LSINSTALL_DIR/admin/misc/lsws.rc" + #sed "s:%LSWS_CTRL%:$LSWS_HOME/bin/lswsctrl:" "$LSINSTALL_DIR/admin/misc/lsws.rc.gentoo.in" > "$LSINSTALL_DIR/admin/misc/lsws.rc.gentoo" + #sed "s:%LSWS_CTRL%:$LSWS_HOME/bin/lswsctrl:" "$LSINSTALL_DIR/admin/misc/lshttpd.service.in" > "$LSINSTALL_DIR/admin/misc/lshttpd.service" if [ -d "$LSWS_HOME/admin/html.$VERSION" ]; then rm -rf "$LSWS_HOME/admin/html.$VERSION" fi @@ -971,10 +971,7 @@ util_mkdir "$CONF_OWN" $SDIR_MOD conf conf/cert conf/templates conf/vhosts conf/vhosts/Example admin/conf admin/tmp phpbuild util_mkdir "$SDIR_OWN" $SDIR_MOD cgid admin/cgid admin/cgid/secret util_mkdir "$DIR_OWN" $SDIR_MOD tmp/ocspcache - chgrp $WS_GROUP $LSWS_HOME/admin/tmp $LSWS_HOME/admin/cgid $LSWS_HOME/cgid chmod g+x $LSWS_HOME/admin/tmp $LSWS_HOME/admin/cgid $LSWS_HOME/cgid - chown $CONF_OWN $LSWS_HOME/admin/tmp/sess_* 1>/dev/null 2>&1 - chown $DIR_OWN $LSWS_HOME/cachedata chown $DIR_OWN $LSWS_HOME/autoupdate chown $DIR_OWN $LSWS_HOME/tmp util_mkdir "$SDIR_OWN" $DIR_MOD Example @@ -1000,7 +997,6 @@ util_cpfile "$SDIR_OWN" $EXEC_MOD fcgi-bin/RailsRunner.rb fcgi-bin/RailsRunner.rb.2.3 util_cpfile "$SDIR_OWN" $EXEC_MOD lsrecaptcha/_recaptcha lsrecaptcha/_recaptcha.shtml - util_cpfile "$SDIR_OWN" $EXEC_MOD admin/misc/rc-inst.sh admin/misc/admpass.sh admin/misc/rc-uninst.sh admin/misc/uninstall.sh admin/misc/lsws.rc admin/misc/lsws.rc.gentoo admin/misc/enable_phpa.sh admin/misc/mgr_ver.sh admin/misc/gzipStatic.sh admin/misc/fp_install.sh admin/misc/create_admin_keypair.sh admin/misc/awstats_install.sh admin/misc/update.sh admin/misc/cleancache.sh admin/misc/lsup.sh admin/misc/testbeta.sh util_cpfile "$SDIR_OWN" $EXEC_MOD admin/misc/ap_lsws.sh.in admin/misc/build_ap_wrapper.sh admin/misc/cpanel_restart_httpd.in admin/misc/build_admin_php.sh admin/misc/convertxml.sh admin/misc/lscmctl util_cpfile "$SDIR_OWN" $DOC_MOD admin/misc/gdb-bt admin/misc/htpasswd.php admin/misc/php.ini admin/misc/genjCryptionKeyPair.php admin/misc/purge_cache_byurl.php util_cpfile "$SDIR_OWN" $DOC_MOD admin/misc/convertxml.php admin/misc/lshttpd.service @@ -1055,7 +1051,6 @@ fi #change conf own as lsadm:nobody permission 750 - chown -R lsadm:$WS_GROUP "$LSWS_HOME/conf/" chmod -R 0750 "$LSWS_HOME/conf/" chmod 0600 "$LSWS_HOME/conf/httpd_config.conf"