diff options
Diffstat (limited to 'install.pl')
| -rw-r--r-- | install.pl | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/install.pl b/install.pl new file mode 100644 index 0000000..3d0ac38 --- /dev/null +++ b/install.pl @@ -0,0 +1,71 @@ +#!/usr/bin/perl + +### This script creates symlinks so things will appear as they do on +### the carbonpictures.com bucky. You will still have to edit +### "lib/constants.pm" and "cgi-bin/localbucky.pm" due to the ridiculous +### way we set this up so long ago. But mostly just paths and shit. +### Also, do touch up the stuff in "fortunes". + +### If you are going to use FTP/SCP to import shit, do something like this: +# vi $BUCKY_ROOT/bin/buckypoll.pl +### ..and set $localpath to "$BUCKY_DATA_ROOT/incoming" +### then: +# /usr/sbin/useradd --home $BUCKY_DATA_ROOT/incoming \ +# --password $BUCKY_FTP_PASS $BUCKY_FTP_LOGIN +# chown $BUCKY_FTP_LOGIN $BUCKY_ROOT/bin/buckypoll.pl +# su $BUCKY_FTP_LOGIN +# nohup $BUCKY_ROOT/bin/buckypoll.pl > output.log 2>&1 & + +###################################################################3 + +use lib "/bucky/lib"; +use Bucky; +use Digest::MD5 qw (md5_hex); + +# path to HTTPS docroot +$DOCROOT = "/web/engine/docs"; +$CGI_BIN = "/web/engine/cgi-bin"; + +# path to bucky install +$BUCKY_ROOT = "/bucky"; +$BUCKY_LIB = "/bucky/lib"; + +# path to bucky data directory (if it lives somewhere else) +$BUCKY_DATA_ROOT = "/bucky/data"; + +# mysql shit +$MYSQL_HOST = "carbonpictures.com"; +$MYSQL_USER = "bucky"; +$MYSQL_PASS = "wh4t3v3r"; + +###################################################################3 + +system('/bin/mkdir', '-p', $BUCKY_DATA_ROOT.'/incoming'); +system('/bin/mkdir', '-p', $BUCKY_DATA_ROOT.'/profile'); +system('/bin/mkdir', '-p', $BUCKY_DATA_ROOT.'/profile/.thumb'); + +system('/bin/ln', '-s', $CGI_BIN.'bucky', $BUCKY_ROOT.'/cgi-bin'); +system('/bin/ln', '-s', $DOCROOT, $BUCKY_ROOT.'/docs'); +system('/bin/ln', '-s', $DOCROOT.'/css', $BUCKY_ROOT.'/css'); +system('/bin/ln', '-s', $BUCKY_DATA_ROOT, $DOCROOT.'/bucky/data'); +system('/bin/ln', '-s', $BUCKY_DATA_ROOT, $BUCKY_ROOT.'/data') + unless ($BUCKY_DATA_ROOT eq $BUCKY_ROOT.'/data'); +system('/bin/ln', '-s', $BUCKY_DATA_ROOT.'/incoming', $BUCKY_ROOT.'/incoming'); + +open MYCNF, "$BUCKY_ROOT/.bucky.cnf"; +print MYCNF <<__OUT__; +[client] +host=$MYSQL_HOST +user=$MYSQL_USER +password=$MYSQL_PASS +__OUT__ +close MYCNF; + +our $USER = ( username => "bucky" ); + +$dbh = DBI->connect ($dsn); + +$hash = generate_invite(); +print STDERR "Please create an admin account: " invite_url($hash) . "\n"; + + |
