Hi All.
Once again I am new to this.
I know is dos you can you dos commands and or batch (.bat) files, to run one command after another.
I know this can be done with linux, but what is needed to be done?
Thanks for your time.
Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230
Batch files / commands
-
- Posts: 14
- Joined: 2006-07-08 18:49
Batch files / commands
!!! I am a newbe to linux, so be kind. !!!
!!! Using command line interface only !!!
!!! Using command line interface only !!!
open a non-existant file in an editor, start the first line with
#!/bin/sh
program1
program2
program3
and then save the file, you can run it using two ways
1) type sh filename
2) make it executable (chmod 755 filename) and ./filename (alternatively, place it in a bin dir which is in your path, echo $PATH, such as /usr/local/bin or someplace, then you can simply type: filename
#!/bin/sh
program1
program2
program3
and then save the file, you can run it using two ways
1) type sh filename
2) make it executable (chmod 755 filename) and ./filename (alternatively, place it in a bin dir which is in your path, echo $PATH, such as /usr/local/bin or someplace, then you can simply type: filename
Eagles may soar, but weasels don't get sucked into jet engines...
-
- Posts: 14
- Joined: 2006-07-08 18:49
Ok thanks for that.
Does this look about right?
file name: hd_install
And to run just type "sh hd_install" with in the folder where the file is.
Thanks for your time.
Does this look about right?
file name: hd_install
Code: Select all
#!/bin/sh
useradd hlds
usermod -d /home/hlds hlds
mkdir /home/hlds
chown hlds /home/hlds
chmod hlds 777 /home/hlds
cd /home/hlds
su hlds
wget http://www.steampowered.com/download/hldsupdatetool.bin
chmod +x hldsupdatetool.bin
./hldsupdatetool.bin
./steam -command update -game "hl2mp" -dir /home/hlds
cd /home/hlds
wget http://taligari.lincoln.ac.uk/fun/HSB4a-serverfull.zip
apt-get install unzip
unzip HSB4a-serverfull.zip
Thanks for your time.
!!! I am a newbe to linux, so be kind. !!!
!!! Using command line interface only !!!
!!! Using command line interface only !!!
no you have too many redundancies, don't use useradd use adduser, the user's home will be created by this command, so no need to usermod anything
and executing that script will just make it do _everything_ from the beginning, every time you run it
just do the top half of it manually, once, and make a script that automates whatever it is you want it to do more than once
and executing that script will just make it do _everything_ from the beginning, every time you run it
just do the top half of it manually, once, and make a script that automates whatever it is you want it to do more than once
Eagles may soar, but weasels don't get sucked into jet engines...
-
- Posts: 709
- Joined: 2005-09-15 20:37
- Location: North by Northwest