fixed sed bug"
This commit is contained in:
parent
3eb1a34c19
commit
b252c8c755
@ -70,7 +70,7 @@ ln -s /home/"$user"/logs /var/www/"$_host_name"/logs
|
||||
|
||||
# TODO create nginx vhost
|
||||
# cp "$_cwd"/assets/example.org.conf /etc/apache2/sites-available/"$_host_name".conf
|
||||
# sed -ir "s/example\.org/$_host_name/g" /etc/apache2/sites-available/"$_host_name".conf
|
||||
# sed -i -r "s/example\.org/$_host_name/g" /etc/apache2/sites-available/"$_host_name".conf
|
||||
#activate the vhost
|
||||
# a2ensite "$_host_name".conf
|
||||
#restart apache
|
||||
|
@ -23,8 +23,8 @@ sleep 3
|
||||
echo -n "Enter an email: "
|
||||
read email
|
||||
|
||||
sed -ir "s/EMAIL=\"root\"/EMAIL=\"$email\"/g" /etc/apticron/apticron.conf
|
||||
# sed -ir "s/# DIFF_ONLY=\"1\"/DIFF_ONLY=\"1\"/g" /etc/apticron/apticron.conf
|
||||
sed -ir "s/# NOTIFY_NEW=\"0\"/NOTIFY_NEW=\"0\"/g" /etc/apticron/apticron.conf
|
||||
sed -i -r "s/EMAIL=\"root\"/EMAIL=\"$email\"/g" /etc/apticron/apticron.conf
|
||||
# sed -i -r "s/# DIFF_ONLY=\"1\"/DIFF_ONLY=\"1\"/g" /etc/apticron/apticron.conf
|
||||
sed -i -r "s/# NOTIFY_NEW=\"0\"/NOTIFY_NEW=\"0\"/g" /etc/apticron/apticron.conf
|
||||
|
||||
echo "\033[92;1mApticron installed and configured\033[0m"
|
||||
|
@ -66,8 +66,8 @@ if [ "$installdkim" = "y" ]; then
|
||||
chmod 440 /etc/exim4/dkim/"$domain"-private.pem
|
||||
|
||||
cp "$_assets"/exim4_dkim.conf /etc/exim4/conf.d/main/00_local_macros
|
||||
sed -ir "s/DOMAIN_TO_CHANGE/$domain/g" /etc/exim4/conf.d/main/00_local_macros
|
||||
sed -ir "s/DATE_TO_CHANGE/$selector/g" /etc/exim4/conf.d/main/00_local_macros
|
||||
sed -i -r "s/DOMAIN_TO_CHANGE/$domain/g" /etc/exim4/conf.d/main/00_local_macros
|
||||
sed -i -r "s/DATE_TO_CHANGE/$selector/g" /etc/exim4/conf.d/main/00_local_macros
|
||||
|
||||
update-exim4.conf
|
||||
systemctl restart exim4
|
||||
|
@ -44,7 +44,7 @@ done
|
||||
|
||||
echo "Configuring proftpd"
|
||||
cp "$_assets"/proftpd.conf /etc/proftpd/conf.d/"$_server_name".conf
|
||||
sed -ir "s/example/$_server_name/g" /etc/proftpd/conf.d/"$_server_name".conf
|
||||
sed -i -r "s/example/$_server_name/g" /etc/proftpd/conf.d/"$_server_name".conf
|
||||
|
||||
ufw allow ftp
|
||||
|
||||
|
@ -102,8 +102,8 @@ if [ "$vh" = "yes" ]; then
|
||||
# cp "$_assets"/git-pre-receive /home/"$user"/git-repositories/"$_domain".git/hooks/pre-receive
|
||||
cp "$_assets"/git-post-receive /home/"$user"/git-repositories/"$_domain".git/hooks/post-receive
|
||||
|
||||
# sed -ir "s/PRODDIR=\"www\"/PRODDIR=/home/$user/www/$_domain/g" /home/"$user"/git-repositories/"$_domain".git/hooks/pre-receive
|
||||
sed -ir "s#PRODDIR=\"www\"#PRODDIR=\"/home/$user/www/$_domain\"#g" /home/"$user"/git-repositories/"$_domain".git/hooks/post-receive
|
||||
# sed -i -r "s/PRODDIR=\"www\"/PRODDIR=/home/$user/www/$_domain/g" /home/"$user"/git-repositories/"$_domain".git/hooks/pre-receive
|
||||
sed -i -r "s#PRODDIR=\"www\"#PRODDIR=\"/home/$user/www/$_domain\"#g" /home/"$user"/git-repositories/"$_domain".git/hooks/post-receive
|
||||
|
||||
chown -R "$user":"$user" /home/"$user"/git-repositories
|
||||
|
||||
|
@ -109,8 +109,8 @@ echo -e '\033[35m
|
||||
echo -e "\033[35;1mInstalling phpMyAdmin \033[0m"
|
||||
apt-get --yes --force-yes install phpmyadmin
|
||||
ln -s /usr/share/phpmyadmin /var/www/html/
|
||||
# cp "$_assets"/nginx-phpmyadmin.conf > /etc/nginx/sites-available/phpmyadmin.conf
|
||||
# ln -s /etc/nginx/sites-available/phpmyadmin.conf /etc/nginx/sites-enabled/phpmyadmin.conf
|
||||
cp "$_assets"/nginx-phpmyadmin.conf > /etc/nginx/sites-available/phpmyadmin.conf
|
||||
ln -s /etc/nginx/sites-available/phpmyadmin.conf /etc/nginx/sites-enabled/phpmyadmin.conf
|
||||
|
||||
# echo -e "\033[35;1msecuring phpMyAdmin \033[0m"
|
||||
# sed -i "s/DirectoryIndex index.php/DirectoryIndex index.php\nAllowOverride all/"
|
||||
|
@ -89,13 +89,13 @@ if [ "$vh" = "y" ]; then
|
||||
fi
|
||||
|
||||
cp "$_assets/$_conffile" /etc/nginx/sites-available/"$_domain".conf
|
||||
sed -ir "s/DOMAIN\.LTD/$_domain/g" /etc/nginx/sites-available/"$_domain".conf
|
||||
sed -i -r "s/DOMAIN\.LTD/$_domain/g" /etc/nginx/sites-available/"$_domain".conf
|
||||
|
||||
mkdir -p /var/www/"$_domain"/public_html
|
||||
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
|
||||
sed -i -r "s/DOMAIN\.LTD/$_domain/g" /var/www/"$_domain"/public_html/index.php
|
||||
|
||||
#set proper right to user will handle the app
|
||||
chown -R root:admin /var/www/"$_domain"/
|
||||
|
Loading…
x
Reference in New Issue
Block a user