add alternc_get_path, to figure out if a path is available on the web
This commit is contained in:
parent
b5b69d9a59
commit
f7004a0fc0
|
@ -439,6 +439,7 @@ src/update_domains.sh -text
|
|||
tests/mechdump.pm -text
|
||||
tests/test_demo.pl -text
|
||||
tests/whois_test.php -text
|
||||
tools/alternc_get_path -text
|
||||
tools/get_account_by_domain -text
|
||||
tools/get_domains_by_account -text
|
||||
tools/top_ftp_users -text
|
||||
|
|
|
@ -74,6 +74,7 @@ install: build
|
|||
install tools/top_ftp_users debian/alternc/usr/bin
|
||||
install tools/get_domains_by_account debian/alternc/usr/bin
|
||||
install tools/get_account_by_domain debian/alternc/usr/bin
|
||||
install tools/alternc_get_path debian/alternc/usr/bin
|
||||
install src/alternc_reload debian/alternc/usr/bin
|
||||
install -m 644 po/fr/LC_MESSAGES/alternc-admintools.mo debian/alternc/usr/share/locale/fr/LC_MESSAGES/
|
||||
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
#! /bin/sh -e
|
||||
|
||||
path="$1"
|
||||
account=`echo "$path" | sed 's#/var/alternc/html/./##' | cut -d '/' -f 1`
|
||||
relpath=`echo "$path" | sed 's#/var/alternc/html/./[^/]*##'`
|
||||
|
||||
request="SELECT membres.login AS user, CONCAT(s.sub, '.', s.domaine) AS fqdn FROM sub_domaines s INNER JOIN membres ON s.compte=uid WHERE login='$account' AND s.type = 0 AND '$relpath' LIKE CONCAT(s.valeur,'%') ORDER BY sub ASC;"
|
||||
|
||||
mysql --defaults-file=/etc/alternc/my.cnf -B -e "$request"
|
||||
|
Loading…
Reference in New Issue