diff --git a/.gitignore b/.gitignore index 97bb7f7..88df0e7 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +moshing-mammut.pid yt_auth_token spotify_auth_token *.db diff --git a/moshing-mammut.service.EXAMPLE b/moshing-mammut.service.EXAMPLE index cc0cbba..e5461b5 100644 --- a/moshing-mammut.service.EXAMPLE +++ b/moshing-mammut.service.EXAMPLE @@ -1,14 +1,17 @@ [Unit] Description=Moshing Mammut +After=network.target [Service] ExecStart=/home/moshing-mammut/app/start.sh -Restart=always +Restart=on-failure User=moshing-mammut Group=moshing-mammut Environment=PATH=/usr/bin:/usr/local/bin Environment=NODE_ENV=production WorkingDirectory=/home/moshing-mammut/app +Type=forking +PIDFile=/home/moshing-mammut/app/moshing-mammut.pid [Install] WantedBy=multi-user.target \ No newline at end of file diff --git a/start.sh.EXAMPLE b/start.sh.EXAMPLE index a620e80..81ecb15 100644 --- a/start.sh.EXAMPLE +++ b/start.sh.EXAMPLE @@ -1,3 +1,3 @@ #!/bin/bash . /home/moshing-mammut/.nvm/nvm.sh -node -r dotenv/config build \ No newline at end of file +node -r dotenv/config build & \ No newline at end of file