Ik word langzaam gek met dit prb -->
ik heb een scriptje gemaakt dat automatisch een user toevoegd aan me system en er een virt host voor aanmaakt
--
#Automated user adding + virtual host adding and www map making
#!/bin/bash
cd /
mkdir edeneddie.net/home/$1/
mkdir edeneddie.net/home/$1/www/
/usr/sbin/useradd $1 -d /edeneddie.net/home/$1/
passwd $1
echo -e "</VirtualHost> \n$(cat /etc/httpd/conf/httpd.conf)">EOF>> /etc/httpd/conf/httpd.conf
echo -e "CustomLog /edeneddie.net/home/$1/access_log common \n$(cat /etc/httpd/conf/httpd.conf)">EOF>> /etc/httpd/conf/httpd$
echo -e "ErrorLog /edeneddie.net/home/$1/error_log \n$(cat /etc/httpd/conf/httpd.conf)">EOF>> /etc/httpd/conf/httpd.conf
echo -e "ServerName $1.hilfinger.org \n$(cat /etc/httpd/conf/httpd.conf)">EOF>>/etc/httpd/conf/httpd.conf
echo -e "DocumentRoot /edeneddie.net/home/www/$1 \n$(cat /etc/httpd/conf/httpd.conf)">EOF>> /etc/httpd/conf/httpd.conf
echo -e "ServerAdmin $1@hilfinger.org \n$(cat /etc/httpd/conf/httpd.conf)">EOF>> /etc/httpd/conf/httpd.conf
echo -e "<VirtualHost $1.hilfinger.org> \n$(cat /etc/httpd/conf/httpd.conf)">EOF>> /etc/httpd/conf/httpd.conf
end
cp /index.html /edeneddie.net/home/$1/www/
-----
Alleen het prb is dat hij het schrijven naar het bestand looped dus de gegevens worden verdubbeld en verdubbeld enz enz tot file max waarde heeft bereikt hoe kan ik de loop stopen ?
Alvast bedankt
ik heb een scriptje gemaakt dat automatisch een user toevoegd aan me system en er een virt host voor aanmaakt
--
#Automated user adding + virtual host adding and www map making
#!/bin/bash
cd /
mkdir edeneddie.net/home/$1/
mkdir edeneddie.net/home/$1/www/
/usr/sbin/useradd $1 -d /edeneddie.net/home/$1/
passwd $1
echo -e "</VirtualHost> \n$(cat /etc/httpd/conf/httpd.conf)">EOF>> /etc/httpd/conf/httpd.conf
echo -e "CustomLog /edeneddie.net/home/$1/access_log common \n$(cat /etc/httpd/conf/httpd.conf)">EOF>> /etc/httpd/conf/httpd$
echo -e "ErrorLog /edeneddie.net/home/$1/error_log \n$(cat /etc/httpd/conf/httpd.conf)">EOF>> /etc/httpd/conf/httpd.conf
echo -e "ServerName $1.hilfinger.org \n$(cat /etc/httpd/conf/httpd.conf)">EOF>>/etc/httpd/conf/httpd.conf
echo -e "DocumentRoot /edeneddie.net/home/www/$1 \n$(cat /etc/httpd/conf/httpd.conf)">EOF>> /etc/httpd/conf/httpd.conf
echo -e "ServerAdmin $1@hilfinger.org \n$(cat /etc/httpd/conf/httpd.conf)">EOF>> /etc/httpd/conf/httpd.conf
echo -e "<VirtualHost $1.hilfinger.org> \n$(cat /etc/httpd/conf/httpd.conf)">EOF>> /etc/httpd/conf/httpd.conf
end
cp /index.html /edeneddie.net/home/$1/www/
-----
Alleen het prb is dat hij het schrijven naar het bestand looped dus de gegevens worden verdubbeld en verdubbeld enz enz tot file max waarde heeft bereikt hoe kan ik de loop stopen ?
Alvast bedankt