Skip to content

Instantly share code, notes, and snippets.

@yankcrime
Last active December 20, 2015 20:09
Show Gist options
  • Save yankcrime/6188480 to your computer and use it in GitHub Desktop.
Save yankcrime/6188480 to your computer and use it in GitHub Desktop.
ownCloud start.sh
#!/bin/bash
HOSTLINE=$(echo $(ip -f inet addr show eth0 | grep 'inet' | awk '{ print $2 }' | cut -d/ -f1) $(hostname) $(hostname -s))
sed -i "s/^172.*/$HOSTLINE/" /etc/hosts
/usr/sbin/mysqld &
/usr/sbin/apache2ctl -D FOREGROUND
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment