Commit 7cee72b3 authored by Paul Cammish's avatar Paul Cammish
Browse files

Initial commit

This is a basic auto-install script which can be used to install *Sympl* with minimal intervention, and point the user to important resources.
if [ $( id -u $(whoami) ) != 0 ]; then
echo "Sorry, this must be run as root."
exit 1
codename=$( lsb_release -c | cut -f 2 )
case "x$1" in
"x") version="$codename";;
"x--testing") version="$codename-testing" ;;
*) echo "Unknown parameter: $1"; exit 1 ;;
echo "-----------------------------------------------------------------------"
echo " Sympl Installer v0.1"
echo "-----------------------------------------------------------------------"
echo "This script will help you install Sympl on a Debian Linux server with minimal"
echo " hassle, and give you some intial pointers."
echo "Installing Sympl from '$version' repository."
if [ "x$(which debconf-set-selections)" = "x" ]; then
echo Installing debconf to set defaults...
apt-get -qq update
apt-get -qq -y install debconf
if [ "x$(which debconf-set-selections)" = "x" ]; then
echo "Unable to set defaults, you will need to install manually, sorry."
exit 0
echo "OK"
echo "phpmyadmin phpmyadmin/reconfigure-webserver select apache2" | debconf-set-selections
echo "roundcube-core roundcube/dbconfig-install boolean true" | debconf-set-selections
echo "roundcube-core roundcube/database-type select mysql" | debconf-set-selections
echo "roundcube-core roundcube/mysql/app-pass password" | debconf-set-selections
echo "roundcube-core roundcube/reconfigure-webserver select apache2" | debconf-set-selections
echo -n "Adding repository key..."
wget -qO- | apt-key add -
if [ "$(find /etc/apt/sources.list.d/ -mindepth 1 -maxdepth 1 -type f -name 'sympl_*.list' | wc -l )" != "0" ]; then
echo -n "Removing previous Sympl repo..."
find /etc/apt/sources.list.d/ -mindepth 1 -maxdepth 1 -type f -name 'sympl_*.list' -delete
echo "OK"
echo -n "Adding repository to apt..."
echo "deb $version main" > "/etc/apt/sources.list.d/sympl_$version.list"
echo "OK"
echo -n "Updating apt..."
apt-get -qq update
echo "OK"
echo "Installing Sympl... (this will take a while)"
echo "Starting in 5 seconds - Ctrl-C to cancel!"
sleep 5
apt-get -qq -y install --install-recommends sympl-core
if [ $? != 0 ]; then
echo "Something went wrong. Exiting."
exit 0
echo -n "Thanks for installing..."
read -n 1 -p 'Press any key for important information!'
echo "
1. This system now has a system user named 'sympl', which has inherited the
password of the 'root' user.
You should change this password IMMEDIATELY.
Ensure the password is complex as it has access to the whole system.
Consider using SSH Keys where possible.
2. If you need to access MySQL/MariaDB, there a 'sympl' user hase been
created for that purpose.
You can use the 'mysql' command without specifying a username/password.
If you need it, the username is 'sympl', and password is in
/home/sympl/mysql_password, but you should not use this anywhere else,
and instead create individual users as needed.
3. Documentation is at
Help can be found at
If yoiu encounter a bug, you can log it at
4. To get started, check
Setting new password for 'sympl' user:"
passwd sympl
echo "All done!"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment