Server Help Forum Index Server Help
Community forums for Subgame, ASSS, and bots
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   StatisticsStatistics   RegisterRegister 
 ProfileProfile   Login to check your private messagesLogin to check your private messages   LoginLogin (SSL) 

Server Help | ASSS Wiki (0) | Shanky.com
Simple mutli-zone setup

 
Post new topic   Reply to topic Printable version
 View previous topic  Turret bug. Post :: Post Using Netgear Router; problems with bi...  View next topic  
Author Message
Mine GO BOOM
Hunch Hunch
What What
Hunch Hunch<br>What What


Age:42
Gender:Gender:Male
Joined: Aug 01 2002
Posts: 3615
Location: Las Vegas
Offline

PostPosted: Wed Jul 07, 2004 3:13 pm    Post subject: Simple mutli-zone setup Reply to topic Reply with quote

Was thinking about a way in which ASSS could be done nicely with things like portage or pacman, and figured that a nice way to be able to support multiple zone setups on one machine, with the same ASSS executables, would be to have ASSS work out of the home folder by default.

Example: ASSS would be in /usr/bin, while the modules would be where ever is a good place to store them, with default configuration files and what not. When a user runs ASSS, it first checks the ~/asss folder. If it doesn't exist, will run a simple setup prompt for the user, where they can enter first-time things like zone name, port, etc. In the asss folder would be everything that is now normal, except won't have the ASSS executable, and the bin folder would be empty (or symlinks).

So for each zone, a server could setup a new user. Should allow for some variable, like ASSSROOT, in which you can point to a different location for your zone.

This will allow for people to keep simple updates to the core ASSS files if their distro supports a central system, like portage or pacman.
Back to top
View users profile Send private message Add User to Ignore List Send email
i88gerbils
Oldbie Server Help


Gender:Gender:Male
Joined: Dec 13 2002
Posts: 423
Location: OH
Offline

PostPosted: Wed Jul 07, 2004 5:55 pm    Post subject: Reply to topic Reply with quote

Wouldn't it be better to keep the bin folder together, and then make /sbin/asss or /usr/bin/asss a link back to the asss folder?

Currently, I've got it arranged like /usr/local/SubSpace/asss where asss is a symlink to the current asss version folder.

you could make a shell script that does this in a roundabout way. Perhaps even using useradd -G $ZONENAME -d /home/$ZONENAME -p password username to forgo the process of creating a user for the zone. And then after creating the arena directory, ln -s $ASSHOME/arenas/$ZONENAME /home/$ZONENAME/.asss or whatever. It could also copy out default settings.

[edit]
This should work for now :d. Though it'd be better to make some more checks like if ap_multipub is enabled, and then add the $ZONEDIR to the public arena list.

Alhough this is more user-friendly I'd like command-line parameters instead.

Code: Show/Hide
#!/bin/sh
# ASSS Zone Setup - v.01
#
# need to have the correct permissions to run various programs (i.e. root)
#
# ASSS Home Directory  (e.g. /usr/local/asss-1.1.7)

ASSSHOME="/usr/local/games/SubSpace/asss"
   
echo
echo "ASSS Zone Setup - v.01"
echo
     
LOOPCHECK='n'
   
while [ $LOOPCHECK = 'n' ];
do

  echo "Directory for the zone (e.g. pb, aswz, or elim):"
  read ZONEDIR

  echo
  echo "Username for zone administrator (e.g. gerbil):"
  read USRNAME


  echo
  echo "Zone Directory: $ASSSHOME/$ZONEDIR"
  echo "Login: $USRNAME"
    echo "Is this information correct? (y or n)"
    read LOOPCHECK

  MIDCHECK=0

  while [ $MIDCHECK -eq 0 ];
  do
    case "$LOOPCHECK" in
    y | Y) MIDCHECK=1;;
    n | N) MIDCHECK=1;;
    *)
     echo
     echo "Please enter a choice (y or n):"
     read LOOPCHECK;;
    esac
  done
 
done
 
echo
echo "To add zone now, press ENTER."
echo "To cancel, press Control-C."
read cont < /dev/tty
  # zone directory
mkdir $ASSHOME/arenas/$ZONEDIR
     
# user and group add
groupadd $ZONEDIR
useradd -G $ZONEDIR -d /home/$USRNAME $USRNAME
 
# permissions
chgrp $ZONEDIR $ASSSHOME/arenas/$ZONEDIR
chown $USRNAME $ASSSHOME/arenas/$ZONEDIR

# symlink from home directory
ln -s $ASSSHOME/arenas/$ZONEDIR /home/$USRNAME/$ZONEDIR

echo "Zone Setup Complete"
echo
echo "Password for $USRNAME:"
passwd $USRNAME

_________________
Oldbie Server Help
Back to top
View users profile Send private message Add User to Ignore List Send email Visit posters website Yahoo Messenger
Jackmn
Newbie


Joined: Apr 02 2004
Posts: 13
Offline

PostPosted: Thu Jul 08, 2004 10:20 pm    Post subject: Reply to topic Reply with quote

I really prefer just symlinking to the ASSS directory, as I88 said.
Back to top
View users profile Send private message Add User to Ignore List
Mine GO BOOM
Hunch Hunch
What What
Hunch Hunch<br>What What


Age:42
Gender:Gender:Male
Joined: Aug 01 2002
Posts: 3615
Location: Las Vegas
Offline

PostPosted: Thu Jul 08, 2004 10:59 pm    Post subject: Reply to topic Reply with quote

I did intend to mean that, as this week I'm running very low on energy, as I've been working fucked up hours all week long, and will be doing so for the next few weeks. This thought only came to me as I'm attempting to fall asleep, so it isn't all completely worked out, but I'm sure Grelminar or whomever could expand on it nicely as you guys have.
Back to top
View users profile Send private message Add User to Ignore List Send email
Display posts from previous:   
Post new topic   Reply to topic    Server Help Forum Index -> ASSS Questions All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum
View online users | View Statistics | View Ignored List


Software by php BB © php BB Group
Server Load: 52 page(s) served in previous 5 minutes.

phpBB Created this page in 0.452651 seconds : 28 queries executed (94.0%): GZIP compression disabled