::bash shell scripts::
first line of a script should be: #!/bin/bash (path to shell that the script will be executed from)
A script that checks to see if a MUD is running on a particular port. The port number should be changed of course to whichever your MUD runs on. If the MUD is already running the script will reply so. If the MUD will not start or something strange is happening it will reply that the MUD cannot be started.
CHECK=`ps ux | grep -c "6104"`
if [ $CHECK = "2" ]
echo "Sorry, port 6104 is already running."
csh -f ./startup &
CHECK2=`ps ux | grep -c "6104"`
if [ $CHECK2 = "2" ]
echo "Port 6104 started successfully!"
echo "There was an error loading 6104 :("
A friendly menu that uses instances of the mudportrun script to start MUDs on different ports.
echo " ~Start Menu~ "
echo " Start Player's Port 6100"
echo " Start Builder's Port 6101"
echo " Start Migration Port 6104"
echo " Exit"
case $ENTRY in
) playrun ;;
) buildrun ;;
) quickrun ;;
) echo "ByE!" ;;
*) echo "Please enter a valid choice"; startup ;;
Script that backs up a user's home dir and then archives and compresses it along with datestamping the filename.
#backup user's home dir and compress it with bzip
#based heavily upon a backup script from mandrake linux documentation
#the rest all by eric m. bouse
tar cvjf $TEMP_DEST_DIR/backup.tar.bz2 $HOME
mv $TEMP_DEST_DIR/backup.tar.bz2 $FINAL_DEST_DIR/backup_home_$DATESTAMP.tar.bz2
Converts filenames to lowercase in current directory. Relies on "convmv" utility.
convmv --lower --notest *
rsync -a -v -r -c --progress --stats --delete /home/resinblade/Desktop/backup/ -e ssh email@example.com:/storage5