Cancelled

reparación comando sh para hacer clone desde el git y un rebuld del apache para cambiar la carpeta public en un cpanel - 29/04/2018 11:26 EDT

necesito que este script funcione. actualmente al terminar el script tengo problemas de permisos en mi vps cpanel.

1.- dejar este scripts funcional

comando que me arroja error de : chmod y cp no such file or directory y al final no levanta el

#!/bin/bash

CPANEL_PATH=/var/cpanel/userdata/

#obtener usuario

read -p 'Usuario:' username

read -p "Nombre del archivo del dominio ($CPANEL_PATH$username/[archivo]):" domainfilename

read -p "Nombre del path de instalacion (/home/$username/[path]):" rootpath

read -p "Nombre del rootpath/public (/home/$username/$rootpath/[path]:" publicpath

read -p "Url Repositorio: " repourl

domainfilename="$CPANEL_PATH$username/$domainfilename"

rootpath="/home/$username/$rootpath"

publicpath="$rootpath/$publicpath"

if [ -r $rootpath ]; then

echo "Error el directorio $rootpath ya existe!"

exit 1

fi

cp $domainfilename "$[url removed, login to view]"

sed -i "s#documentroot.*#documentroot: $publicpath#" $domainfilename

/scripts/rebuildhttpdconf

service httpd restart

#if ["$username" != ""];

#then

if [ ! -d $rootpath ]; then

echo "Creando el directorio $rootpath"

mkdir "$rootpath"

fi

git clone $repourl "$rootpath"

mkdir "$rootpath/logs"

chmod 644 -R "$rootpath"

chown $username:$username -R $rootpath

chown $username:nobody $rootpath

chmod 755 -R "$rootpath/*.php"

chmod 755 -R "$publicpath"

if [ -d "$rootpath/storage" ]; then

chmod 777 -R "$rootpath/storage"

fi

cp -r htaccess "$rootpath/.htaccess"

chmod 755 -R "$rootpath/.htaccess"

#fi

Skills: Apache, Linux, MySQL, PHP, Web Hosting

About the Employer:
( 1 review ) Viña del Mar, Chile

Project ID: #16823647

2 freelancers are bidding on average $19250 for this job

wdemian

Hola. Puedo hacerlo. Pregúntame lo que sea.

$30000 CLP in 1 day
(26 Reviews)
5.2
webinvoidia

Dear Hiring Manager/Hello I’ve carefully gone through your job posting. I ’m an expert with more than 4 years experiences of both web development front-end developer. I am very much interested in your project with al More

$8500 CLP in 1 day
(0 Reviews)
0.0