I'm using CentOS 7. I want to run a nodeJS script as a service but run the service as the "rails" user. As root, I created the file /usr/lib/systemd/system/myservice.service, with the contents
[Unit] Description=mydir nodejs server [Service] ExecStart=/home/rails/mydir/start.sh ExecStop=/home/rails/mydir/stop.sh [Install] WantedBy=multi-user.target
What else do I need to do to get the service to run as the user I want?