I have a very ( seemingly ) simple question, of how to keep an x86_64 application "alive" on an Ubuntu server. Initially and through great effort ( I am very inexperienced with Ubuntu/Linux), I was able to have it boot on startup, however the application seems to "die" every once in a while anyway.
I attempted to make the application into a service, like so:
[Unit] Description=runs the mmo After=multi-user.target [Service] Type=oneshot ExecStart=/root/mmo/MMO.x86_64 Restart=on-failure [Install] WantedBy=multi-user.target
and uploaded it via ftp to "/etc/systemd/system" on my server and set the permissions to 777, however the file I uploaded ( the icon) looks different from the other .service files so I think I did something wrong
( it looks like a text document, while the other ones look like like shortcuts to folders , even though I named mine .service also)
what am I doing wrong? thanks in advance
root@server1:~# systemctl status mmo * mmo.service - runs the mmo Loaded: error (Reason: Invalid argument) Active: failed (Result: signal) since Thu 2018-01-04 02:48:53 UTC; 2 days ago Main PID: 757 (code=killed, signal=KILL)
Jan 06 13:44:41 server1.nwg.website systemd1: mmo.service: Service has Restart Warning: Journal has been rotated since unit was started. Log output is incomple lines 1-7/7 (END) * mmo.service - runs the mmo Loaded: error (Reason: Invalid argument) Active: failed (Result: signal) since Thu 2018-01-04 02:48:53 UTC; 2 days ago Main PID: 757 (code=killed, signal=KILL)
EDIT / progress : Now able to start the service ( more info in the long comments below), however when I try to add "Restart=on-failure" it gives the error where it complains that the service has a restart - I tried changing it to simple but that didn't help - what do I do?