added default index.php
This commit is contained in:
parent
29c8d50b53
commit
0be97f397c
13
assets/index.php
Normal file
13
assets/index.php
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en" dir="ltr">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<title>DOMAIN.LTD</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<h1>DOMAIN.LTD</h1>
|
||||||
|
|
||||||
|
<?php phpinfo(); ?>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
15
bin/vhost.sh
15
bin/vhost.sh
@ -90,25 +90,28 @@ if [ "$vh" = "y" ]; then
|
|||||||
sed -ir "s/DOMAIN\.LTD/$_domain/g" /etc/nginx/sites-available/"$_domain".conf
|
sed -ir "s/DOMAIN\.LTD/$_domain/g" /etc/nginx/sites-available/"$_domain".conf
|
||||||
|
|
||||||
mkdir -p /var/www/"$_domain"/public_html
|
mkdir -p /var/www/"$_domain"/public_html
|
||||||
mkdir /var/www/"$_domain"/logs
|
mkdir /var/www/"$_domain"/log
|
||||||
|
|
||||||
|
cp "$_assets/index.php" /var/www/"$_domain"/public_html/
|
||||||
|
sed -ir "s/DOMAIN\.LTD/$_domain/g" /var/www/"$_domain"/public_html/index.php
|
||||||
|
|
||||||
#set proper right to user will handle the app
|
#set proper right to user will handle the app
|
||||||
chown -R root:admin /var/www/"$_domain"/
|
chown -R root:admin /var/www/"$_domain"/
|
||||||
chmod -R g+w /var/www/"$_domain"/
|
chmod -R g+w /var/www/"$_domain"/
|
||||||
chmod -R g+r /var/www/"$_domain"/
|
chmod -R g+r /var/www/"$_domain"/
|
||||||
|
|
||||||
# create a shortcut to the site
|
|
||||||
# TODO ask for $user name if not existing
|
|
||||||
|
|
||||||
|
|
||||||
|
# create a shortcut to the site
|
||||||
echo -n "Should we install a shortcut for a user? [Y|n] "
|
echo -n "Should we install a shortcut for a user? [Y|n] "
|
||||||
read yn
|
read yn
|
||||||
yn=${yn:-y}
|
yn=${yn:-y}
|
||||||
if [ "$yn" = "y" ]; then
|
if [ "$yn" = "y" ]; then
|
||||||
|
# if $user var does not exists (vhost.sh ran directly) ask for it
|
||||||
if [ -z ${user+x} ]; then
|
if [ -z ${user+x} ]; then
|
||||||
echo -n "Enter an existing user name: "
|
|
||||||
read user
|
|
||||||
while [ "$user" = "" ]
|
while [ "$user" = "" ]
|
||||||
do
|
do
|
||||||
read -p "enter a user name ? " user
|
read -p "enter an existing user name ? " user
|
||||||
if [ "$user" != "" ]; then
|
if [ "$user" != "" ]; then
|
||||||
check if user already exists
|
check if user already exists
|
||||||
if id "$user" >/dev/null 2>&1; then
|
if id "$user" >/dev/null 2>&1; then
|
||||||
|
Loading…
x
Reference in New Issue
Block a user