When you log in as otsmanager, you will see instructions like this:
1=================== TFS commands ===================
2 If you run TFS with the following commands, it will auto restart.
3 Enable auto-start on boot: sudo systemctl enable tfs
4 Disable auto-start on boot: sudo systemctl disable tfs
5 Start TFS: sudo systemctl start tfs
6 Stop TFS: sudo systemctl stop tfs
7 Restart TFS: sudo systemctl restart tfs
8 Check status of TFS: systemctl status tfs
9 Show full TFS log: journalctl -u tfs (q to exit)
10 Follow TFS console: journalctl -u tfs -f (CTRL+C to stop)
11
12=================== Useful commands ===================
13Update TFS to latest master: updatetfs
14 Show service due date: duedate
15 Show server IP: serverip
16 Share a file: transfer path/to/file
Initially, when your service is freshly installed, TFS is not running. It is also not set up to launch on boot.
It is highly recommended that you enable start on boot so that your TFS launches automatically if your machine reboots!
If you use our commands which launch TFS (or any other engine) as a service, it will automatically restart if the process crashes.
Therefore, you should first enable tfs (sudo systemctl enable tfs):
1otsmanager@176-31-89-137:~$ sudo systemctl enable tfs
2Created symlink from /etc/systemd/system/default.target.wants/tfs.service to /etc/systemd/system/tfs.service.
Then you can start tfs (sudo systemctl start tfs):
1otsmanager@176-31-89-137:~$ sudo systemctl start tfs
2otsmanager@176-31-89-137:~$ sudo systemctl status tfs
3● tfs.service - The Forgotten Server
4 Loaded: loaded (/etc/systemd/system/tfs.service; enabled; vendor preset: enabled)
5 Active: active (running) since Fri 2015-12-18 22:59:15 CET; 22min ago
6Main PID: 18621 (screen)
7 CGroup: /system.slice/tfs.service
8
9Dec 18 22:59:13 176-31-89-137.spigu.net systemd[5923]: Starting The Forgotten Server...
10Dec 18 22:59:15 176-31-89-137.spigu.net systemd[5923]: Started The Forgotten Server.
You can start following logs in realtime (journalctl -u tfs -f):
1otsmanager@176-31-89-137:~$ journalctl -u tfs -f
2-- Logs begin at Mon 2015-12-14 09:12:51 BRST. --
3Dec 14 09:39:30 176-31-82-127 tfs[2913]: [12:39:25.510] > Unserialization time: 0.163 seconds.
4Dec 14 09:39:30 176-31-82-127 tfs[2913]: [12:39:25.510] >> Checking world type... Open PvP
5Dec 14 09:39:30 176-31-82-127 tfs[2913]: [12:39:25.510] >> Starting to dominate the world... done.
6Dec 14 09:39:30 176-31-82-127 tfs[2913]: [12:39:25.510] >> Initializing game state and binding services...
7Dec 14 09:39:30 176-31-82-127 tfs[2913]: [12:39:27.402] > Global IP address: 176.31.82.127
8Dec 14 09:39:30 176-31-82-127 tfs[2913]: [12:39:27.403] > Bound ports: 7171 7172
9Dec 14 09:39:30 176-31-82-127 tfs[2913]: [12:39:27.403] >> Everything smells good, server is starting up...
10Dec 14 09:39:30 176-31-82-127 tfs[2913]: [12:39:28.403] >> Forgotten server Online!