I'm running a Half-Life dedicated server on my VPS with following bash file named startserver in HLDS:
#!/bin/bash
screen -A -m -d -S hlds ./hlds_run -console -game valve -ip **ip address** -port 27015 +maxplayers 16 +map crossfire > /dev/null >&1 &
So I type ./startserver and my server is running. I'm not owner of this code, I just copied it. And I tried to make this code work for a PHP file and I created a directory named "test" and I have "test.php" code so that I can run my php file by typing "php test.php" but I need to run it on a screen too, because I'm not always gonna run the putty client.
I tried to edit the code in the directory where my php file exists and that's what I got inside:
#!/bin/bash screen -AmdS phper php test.php > test.txt >&1 &
I supposed to create a screen named "phper" and run the test.php inside. All files exist in the directory but I face with that error:
/bin/bash: screen -AmdS phper php test.php > test.txt >&1 &: No such file or directory
Am I doing something wrong?