# How to create systemd services: http://neilwebber.com/notes/2016/02/10/making-a-simple-systemd-file-for-raspberry-pi-jessie/ # Digital ocean on a mongodb service: https://www.digitalocean.com/community/tutorials/how-to-install-mongodb-on-ubuntu-16-04 [Unit] Description=Run SystemD as users After=network.target [Service] Type=simple User=[USER HERE] WorkingDirectory=[USER HOME] ExecStart=/bin/bash --login -c 'source [USER_HOME]/.bashrc; cd [Directory of command] && [COMMAND TO RUN]' Restart=always [Install] WantedBy=multi-user.target