Search
Search
Search
Search
Information
Information
Light
Dark
Open actions menu
Basic upload method
Bypass upload method
Tips!
If you encounter an error (by firewall) while uploading using both methods,
try changing extension of the file before uploading it and rename it right after.
This uploader supports multiple file upload.
Submit
~
scripts
File Content:
angularjsdomainmapping.sh
if [ "$#" == 4 ] then username=$1 domain_name=$2 domain_path=$3 port=$4 filename=$(echo $domain_name | sed 's/\*./wildcard_/g') app_path="$domain_path""app.js" current_time=$(date "+%Y.%m.%d-%H.%M.%S") slash_back_remove_string=$( echo $domain_path | sed 's/\(.*\)\/$/\1/g') new_fileName=$slash_back_remove_string.$current_time mv $slash_back_remove_string $new_fileName mkdir -p $domain_path cd $domain_path npxpath=`whereis npx | awk '{print $2}' | tr -d '\n'` npmpath=`whereis npm | awk '{print $2}' | tr -d '\n'` $npmpath install -g @angular/cli --verbose | n ng new my-app --routing --style="css" #ng new my-app --style="css" mkdir -p /var/sentora/logs/nodejs/$username mkdir -p $domain_path chown -R $username. $domain_path pm2path=`whereis pm2 | awk '{print $2}' | tr -d '\n'` cd $domain_path cd my-app $pm2path start "ng serve --port $port --host 0.0.0.0" --name $domain_name --user $username --uid $username --gid $username --error /var/sentora/logs/nodejs/$username/$filename-node-error.log --output /var/sentora/logs/nodejs/$username/$filename-node-out.log $pm2path save $pm2path startup systemd chown $username:$username /var/sentora/logs/nodejs/$username chown $username:$username /var/sentora/logs/nodejs/$username/$filename-node-error.log chown $username:$username /var/sentora/logs/nodejs/$username/$filename-node-out.log n_dom_conf_file="/etc/sentora/configs/apache/domains/$filename"".conf" n_node_dom_conf_file="/etc/sentora/configs/apache/nodejs/$filename"".conf" n_dom_ssl_conf_file="/etc/sentora/configs/apache/domains/ssl_$filename"".conf" mkdir -p /etc/sentora/configs/apache/nodejs/ echo "ProxyRequests off" > $n_node_dom_conf_file echo "<Proxy *>" >> $n_node_dom_conf_file echo "AllowOverride All" >> $n_node_dom_conf_file echo "Require all granted" >> $n_node_dom_conf_file echo "</Proxy>" >> $n_node_dom_conf_file echo "<Location />" >> $n_node_dom_conf_file echo "ProxyPass http://localhost:$port/" >> $n_node_dom_conf_file echo "ProxyPassReverse http://localhost:$port/" >> $n_node_dom_conf_file echo "</Location>" >> $n_node_dom_conf_file echo '<Location "/.well-known">' >> $n_node_dom_conf_file echo "ProxyPass !" >> $n_node_dom_conf_file echo "ProxyPassReverse !" >> $n_node_dom_conf_file echo "</Location>" >> $n_node_dom_conf_file virtual_detail1=$(grep -no "</virtualhost>" $n_dom_conf_file); line6=$(echo $virtual_detail1 | awk '{print $1}' FS=":"); virtual_ssl_detail1=$(grep -no "</virtualhost>" $n_dom_ssl_conf_file); linessl6=$(echo $virtual_ssl_detail1 | awk '{print $1}' FS=":"); if [[ $line6 = *[[:digit:]]* ]]; then echo "came here"; one=1 line7=`expr $line6 - $one` linessl7=`expr $linessl6 - $one` config_detail=$( echo "IncludeOptional $n_node_dom_conf_file" | sed 's/\//\\\//g' ); echo "${line7}a $config_detail " $n_dom_conf_file sed -i "${line7}a $config_detail " $n_dom_conf_file sed -i "${linessl7}a $config_detail " $n_dom_ssl_conf_file fi SERVICE_PATH=`whereis service | awk '{print $2}'` `$SERVICE_PATH httpd restart` `$SERVICE_PATH csf restart` `$SERVICE_PATH lfd restart` CSF_PATH=`whereis csf | awk '{print $2}' | tr -d '\n'` $CSF_PATH -r fi
Edit
Download
Unzip
Chmod
Delete