update to latest version
This commit is contained in:
@@ -24,7 +24,7 @@ fi
|
|||||||
|
|
||||||
# Set apt-cacher-ng proxy
|
# Set apt-cacher-ng proxy
|
||||||
echo "Configuring apt to use local apt-cacher-ng proxy"
|
echo "Configuring apt to use local apt-cacher-ng proxy"
|
||||||
echo 'Acquire::http { Proxy "http://192.168.10.10:3142"; };
|
echo 'Acquire::http { Proxy "http://mit.tareo-tz.org:3142"; };
|
||||||
Acquire::https { Proxy "https://"; };' > "/etc/apt/apt.conf.d/01proxy"
|
Acquire::https { Proxy "https://"; };' > "/etc/apt/apt.conf.d/01proxy"
|
||||||
|
|
||||||
killall apt-get
|
killall apt-get
|
||||||
@@ -35,7 +35,8 @@ apt-get update
|
|||||||
|
|
||||||
# Default software
|
# Default software
|
||||||
echo "Installing default software"
|
echo "Installing default software"
|
||||||
apt-get -y install synaptic filezilla
|
apt-get -y install synaptic filezilla libreoffice
|
||||||
|
apt-get -y purge gnumeric* abiword*
|
||||||
|
|
||||||
|
|
||||||
# Reset GUI settings on every login (XFCE)
|
# Reset GUI settings on every login (XFCE)
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
if [ ! -e /etc/cron.d/back-cfg ]; then
|
if [ ! -e /etc/cron.d/back-cfg ]; then
|
||||||
echo "0 11 * * * root /root/scripts/server/back-cfg.sh" > /etc/cron.d/back-cfg
|
echo "0 11 * * * root /root/tareo-scripts/server/back-cfg.sh" > /etc/cron.d/back-cfg
|
||||||
fi
|
fi
|
||||||
|
|
||||||
BAKDIR=/root/backup/cfg
|
BAKDIR=/root/backup/cfg
|
||||||
@@ -12,7 +12,7 @@ BAKS="/etc/apache2/sites-available \
|
|||||||
/etc/apt-cacher-ng/acng.conf \
|
/etc/apt-cacher-ng/acng.conf \
|
||||||
/etc/dnsmasq.conf \
|
/etc/dnsmasq.conf \
|
||||||
/etc/ssh/sshd_config \
|
/etc/ssh/sshd_config \
|
||||||
/etc/NetworkManager/system-connections/eth0 \
|
/etc/NetworkManager/system-connections/* \
|
||||||
/etc/hosts \
|
/etc/hosts \
|
||||||
/etc/apache2/apache2.conf \
|
/etc/apache2/apache2.conf \
|
||||||
"
|
"
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
if [ ! -e /etc/cron.d/back-web ]; then
|
if [ ! -e /etc/cron.d/back-web ]; then
|
||||||
echo "0 14 * * * root /root/scripts/server/back-web.sh" > /etc/cron.d/back-web
|
echo "10 11 * * * root /root/tareo-scripts/server/back-web.sh" > /etc/cron.d/back-web
|
||||||
fi
|
fi
|
||||||
|
|
||||||
BAKDIR=/root/backup/web
|
BAKDIR=/root/backup/web
|
||||||
|
|||||||
10
server/checkdnsmasq.sh
Executable file
10
server/checkdnsmasq.sh
Executable file
@@ -0,0 +1,10 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
if [ ! -e /etc/cron.d/checkdnsmasq ]; then
|
||||||
|
echo "* * * * * root /root/tareo-scripts/server/checkdnsmasq.sh" > /etc/cron.d/checkdnsmasq
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$(service dnsmasq status | tail -n 1 | grep -q "(running)"; echo $?)" != "0" ]; then
|
||||||
|
echo "dnsmasq not running, restart now"
|
||||||
|
service dnsmasq restart
|
||||||
|
fi
|
||||||
@@ -1,10 +1,10 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# echo "* * * * * root /root/scripts/server/list-web-users.sh" > /etc/cron.d/list-web-users
|
# echo "* * * * * root /root/tareo-scripts/server/list-web-users.sh" > /etc/cron.d/list-web-users
|
||||||
|
|
||||||
DOMAINROOT="mit.tareo-tz.org"
|
DOMAINROOT="mit.tareo-tz.org"
|
||||||
INTDOMAINROOT="web.intra"
|
INTDOMAINROOT="web.intra"
|
||||||
WEBDIR="/var/www/html/html"
|
WEBDIR="/var/www/start/html"
|
||||||
|
|
||||||
> $WEBDIR/websites.txt
|
> $WEBDIR/websites.txt
|
||||||
|
|
||||||
@@ -13,7 +13,7 @@ find /var/www/* -maxdepth 0 -type d -print0 | while IFS= read -r -d $'\0' line;
|
|||||||
USER=$(basename $line)
|
USER=$(basename $line)
|
||||||
DOMAIN="$USER.$DOMAINROOT"
|
DOMAIN="$USER.$DOMAINROOT"
|
||||||
INTDOMAIN="$USER.$INTDOMAINROOT"
|
INTDOMAIN="$USER.$INTDOMAINROOT"
|
||||||
if [ ! "$USER" == "html" ] && [ ! "$USER" == "pma" ]; then
|
if [ ! "$USER" == "start" ] && [ ! "$USER" == "pma" ]; then
|
||||||
echo "<li><a href=\"http://$INTDOMAIN\">$INTDOMAIN</a> (alternatively <a href=\"http://$DOMAIN\">$DOMAIN</a>)</li>" >> $WEBDIR/websites.txt
|
echo "<li><a href=\"http://$INTDOMAIN\">$INTDOMAIN</a> (alternatively <a href=\"http://$DOMAIN\">$DOMAIN</a>)</li>" >> $WEBDIR/websites.txt
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
@@ -42,7 +42,8 @@ checkwait
|
|||||||
|
|
||||||
# ADDING USER
|
# ADDING USER
|
||||||
echo "[INFO] Adding user..."
|
echo "[INFO] Adding user..."
|
||||||
adduser $USER
|
#adduser $USER
|
||||||
|
useradd -m -s /bin/bash $USER
|
||||||
echo $USER:$PASS | chpasswd
|
echo $USER:$PASS | chpasswd
|
||||||
adduser www-data $USER
|
adduser www-data $USER
|
||||||
chmod go-rwx /home/$USER # Prevent other users to look into home directory. Webdir will be safe anyway.
|
chmod go-rwx /home/$USER # Prevent other users to look into home directory. Webdir will be safe anyway.
|
||||||
|
|||||||
Reference in New Issue
Block a user