Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Fetching contributors…
Cannot retrieve contributors at this time
executable file 69 lines (51 sloc) 1.57 KB
# Do what's needed to initiate diaspora.
# Usage: # ./diaspora-setup [external hostname] [password]
export PATH=$PATH:/usr/local/bin
path=$( readlink -fn $0) && cd $(dirname $path)/../.. || \
cd /usr/share/diaspora/master
. pkg/source/
test $UID = "0" || {
echo "You need to be root to do this, giving up"
exit 2
services=$( netstat -nl | grep '[^:]:3000[ \t]')
test -n "$services" && {
echo "Warning: something is already using port 3000"
echo " $services"
/sbin/service mongod start || :
libdir=$(rpm --eval %_libdir)
rm -rf vendor
ln -s $libdir/diaspora-bundle/vendor .
ln -sf $libdir/diaspora-bundle/Gemfile .
ln -sf $libdir/diaspora-bundle/Gemfile.lock .
ln -sf $libdir/diaspora-bundle/config .bundle/config
test -e config/app_config.yml ||
cp config/app_config.yml.example config/app_config.yml
[ -e lib/tasks/jasmine.rake ] &&
sudo mv lib/tasks/jasmine.rake lib/tasks/
chkconfig redis off
service redis stop || :
init_appconfig config/app_config.yml $arg_hostname
mongodb_config /etc/mongodb.conf
init_db "$2" || {
cat <<- EOF
Database config failed. You might want to
- Check that mongod is running: service mongodb status
- Repair database files: mongod --repair
- Drop the diaspora mongo database:
% bundle exec rake db:purge
- Remove all db files: rm -rf /var/lib/mongodb/*
- Reset the config file by
'cp config/app_config.yml.example config/app_config.yml'
before making a new try
chown -R diaspora /var/log/diaspora
Jump to Line
Something went wrong with that request. Please try again.