0

What I want to achieve is making a string command start server run the command wine ./_server.exe.

How would I do this?

muru
  • 197,895
  • 55
  • 485
  • 740

2 Answers2

2

You need to define an alias for your command.

Edit your ~/.bash_aliases file and add your command there.

Example:

alias start-server='wine ./_server.exe'

More details -> here

muru
  • 197,895
  • 55
  • 485
  • 740
Andy
  • 393
0

The particular syntax you use (start server) brings to mind Upstart session jobs, since it looks you want to use it as a service. Create a file in ~/.config/upstart/ called some-server.conf (change the name to suit your need, but it must have the .conf extension).

As contents use:

description "Describe your server"

script
    cd /to/where/ever/_server.exe/is
    wine ./_server.exe
end script

Now you can actually do:

start some-server

and

stop some-server

to start and stop the server. You could look at the respawn option too, if you want the program to restart if it exited.

muru
  • 197,895
  • 55
  • 485
  • 740