diff --git a/uber-datenblatt-template.txt b/uber-datenblatt-template.txt index 0b56acd..e2a8fe3 100644 --- a/uber-datenblatt-template.txt +++ b/uber-datenblatt-template.txt @@ -1,52 +1,69 @@ -## DOMAIN +## > DOMAIN Domain: SEDDOMAIN IP Address: SEDIP +## < DOMAIN -## WEBPANEL +## > WEBPANEL https://uberspace.de/login + User: SEDUSER Pass: SEDSSHPASS -## SSH +## < WEBPANEL + +## > SSH Server: SEDHOSTNAME + User: SEDUSER Pass: SEDSSHPASS +## < SSH -## SFTP +## > SFTP Server: SEDHOSTNAME + User: SEDUSER Pass: SEDSSHPASS -## MYSQL +## < SFTP + +## > MYSQL +PHPMyAdmin: https://pma.SEDHOSTNAME Host: localhost DB: SEDUSER + User: SEDUSER Pass: SEDMYSQLPASS -## WORDPRESS +## < MYSQL + +## > WORDPRESS -## MAIL +## < WORDPRESS -Webmail: webmail.SEDDOMAIN +## > EMAIL + +Webmail: https://webmail.SEDDOMAIN # Receive -Typ: IMAP +Type: IMAP Server: SEDDOMAIN Port: 143 STARTTLS / Password, normal # Send -Typ: SMTP +Type: SMTP Server: SEDDOMAIN Port: 587 STARTTLS / Password, normal SMTP server requires authentication +User: +Pass: -User: -Pass: +User: +Pass: -User: -Pass: +## < EMAIL +## DO NOT DELETE diff --git a/uber-standardsetup.sh b/uber-standardsetup.sh index cefc6ca..905c711 100755 --- a/uber-standardsetup.sh +++ b/uber-standardsetup.sh @@ -36,6 +36,7 @@ if [ "$MYSQLPASS" == "" ]; then fi read -p "Domain: " DOMAIN +read -p "SSH Passwort: " SSHPASS IP=$(wget -q -O - http://ip4.nandus.net) echo "User: $USER" # user in system @@ -45,7 +46,8 @@ echo "Server: $SERVER" # e.g. cetus echo "Domain: $DOMAIN" echo "IP: $IP" echo "Virtualdir: $VIRTUAL" -echo "MySQL-Passwort: $MYSQLPASS" +echo "MySQL Password: $MYSQLPASS" +echo "SSH Password: $SSHPASS" echo "" read -p "All correct? If not, cancel now." END @@ -58,31 +60,55 @@ uberspace-add-domain -d $DOMAIN -m # Setup basic directories mkdir ~/backup +mkdir -p ~/bin ~/lib/python2.4 ~/lib/python2.6 # Setup softlinks ln -s $VIRTUAL ~/virtual +# Mail +vsetup + # Webmail mkdir $VIRTUAL/webmail.$DOMAIN echo "RedirectPermanent / https://webmail.$HOSTNAME" > $VIRTUAL/webmail.$DOMAIN/.htaccess +# Web administration panel +read -p "Should the web administration panel be installed? [y/N] " YN +if [ "$YN" == "y" ]; then + SENDMAILPATH=$(which sendmail) + read -p "TO which email should reports be sent?" TOEMAIL + read -p "FROM which email should reports be sent?" FREMAIL + + git clone http://src.mehl.mx/git/uberspace-webadmin.git $VIRTUAL/panel.$DOMAIN + + # Create and edit config.cfg + cp $VIRTUAL/panel.$DOMAIN/config.cfg.sample $VIRTUAL/panel.$DOMAIN/config.cfg + sed -r -i \ + -e "s|DOMAIN=.*|DOMAIN=$DOMAIN|" \ + -e "s|TOEMAIL=.*|DOMAIN=$DOMAIN|" \ + -e "s|FREMAIL=.*|DOMAIN=$DOMAIN|" \ + -e "s|SENDMAILPATH=.*|DOMAIN=$DOMAIN|" \ + $VIRTUAL/panel.$DOMAIN/config.cfg + + # Set htaccess and htpasswd + cp $VIRTUAL/panel.$DOMAIN/.htaccess.sample $VIRTUAL/panel.$DOMAIN/.htaccess + sed -r -i \ + -e "s|AuthUserFile.*|AuthUserFile $VIRTUAL/panel.$DOMAIN/.htpasswd|" \ + $VIRTUAL/panel.$DOMAIN/.htaccess + + htpasswd -b -c $VIRTUAL/panel.$DOMAIN/.htpasswd $USER $SSHPASS + + # Install dependencies + easy_install pexpect +fi # Create datasheet - -DOMAIN=$DOMAIN -USER=$USER -HOSTNAME=$HOSTNAME -MYSQLPASS=$MYSQLPASS -SSHPASS= - -read -p "SSH Passwort: " SSHPASS - sed -e 's/SEDDOMAIN/'$DOMAIN'/g' \ -e 's/SEDIP/'$IP'/g' \ -e 's/SEDUSER/'$USER'/g' \ -e 's/SEDHOSTNAME/'$HOSTNAME'/g' \ -e 's/SEDMYSQLPASS/'$MYSQLPASS'/g' \ -e 's/SEDSSHPASS/'$SSHPASS'/g' \ -uber-datenblatt-template.txt > $USER-Notes.txt +uber-datenblatt-template.txt > $HOME/$USER-Notes.txt