Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Easy Scripts
#1
Is there a way to insert the site name into a easy script??

greetings JTH

Restored from old drupal forum, for user uid:1900 username:JTH
You may reset your password to access your new account here.
Reply
#2
please explain abit your request..
insert site name to where ?
will site name a constant, in db, or will be prompted by user ?

Restored from old drupal forum, for user uid:1900 username:JTH
You may reset your password to access your new account here.
Reply
#3
I want to make a script that makes a symlink to a specified direction whit in the name of the symlink the domain name of the site. Thats short what i want to do.

greetings JTH

Restored from old drupal forum, for user uid:1 username:ehcpdeveloper
You may reset your password to access your new account here.
Reply
#4
i think you can do that,
go to your phpmyadmin,
ehcp db
scripts table
edit your custom script name,
edit field commandsaftercopy,
you may put any linux command in that field, like ln -s, or link commands..

The only thing, to insert domainname at some point of commands, you need a patch in ehcp code,
i will prepare and send you a patch for related function in a few minutes...


Restored from old drupal forum, for user uid:1900 username:JTH
You may reset your password to access your new account here.
Reply
#5
open classapp.php with your favorite editor,

find function:
function getAndInstallFile($bilgi,$domain,$directory){

then find line that says (near bottom of function):
foreach(explode("\n",$bilgi['commandsaftercopy']) as $com) {

then add following just below that line:
$com=str_replace(array('{domainname}','{domainhome}','{targetdirectory}'),array($domainname,$domainhome,$targetdirectory),$com);

save the file,
restart ehcp: /etc/init.d/ehcp restart

After that, you may use the tags {domainname}, {domainhome} and {targetdirectory} in "commandsaftercopy" section/field of scripts table.

thats all..

for ex:
if you have domain: yourdom.com
you installed the script (of your desire) into dir: mydir
then, those variables are equivalent to:
{domainname} -> yourdom.com
{domainhome} -> /var/www/yourftp/yourdom.com/httpdocs
{targetdirectory} -> /var/www/yourftp/yourdom.com/httpdocs/mydir

note that, target directory includes domainname too..

for ex:
if you wish to make the script to symlink to a place of your domain:
ln -s {domainhome} /your/other/place


Note that easy install scripts will download and install existing scripts/programs such as phpbb to in your domain directories.. if you just want to execute some commands, but do not want actually to insall anything, then you may setup an empty/dummy zip and show it as a script to this feature..

(this patch will be included in newer versions of ehcp)

Restored from old drupal forum, for user uid:1 username:ehcpdeveloper
You may reset your password to access your new account here.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)

Online Shopping App
Online Shopping - E-Commerce Platform
Online Shopping - E-Commerce Platform
Feinunze Schmuck Jewelery Online Shopping