by vybe
14 deployments · 2 still active · last rev. 7 years ago

Prepares the linode for Sprinkle. (http://github.com/benschwarz/passenger-stack)

Compatible with: No distros currently supported

# <udf name="admin_username" label="Admin Username" />
# <udf name="admin_password" label="Admin Password" />

source <ssinclude StackScriptID="1">
source <ssinclude StackScriptID="44"> # Enabled Universe

# Update the system and hostname
hostname `get_rdns_primary_ip`

# Add wheel to /etc/sudoers
aptitude -y install sudo
groupadd wheel
cp /etc/sudoers /etc/sudoers.tmp
chmod 0640 /etc/sudoers.tmp
echo "%wheel ALL = (ALL) ALL" >> /etc/sudoers.tmp
chmod 0440 /etc/sudoers.tmp
mv /etc/sudoers.tmp /etc/sudoers

# Create admin and add SSH key
useradd -m -s /bin/bash -G wheel $ADMIN_USERNAME
echo "${ADMIN_USERNAME}:${ADMIN_PASSWORD}" | chpasswd