Systemd cant find my 'start.sh' file?











up vote
0
down vote

favorite












so i am trying to get a minecraft server running as a service of systemd



my minecraft.service has this content:



[Unit]
Description=Minecraft Server
After=network.target

[Service]
WorkingDirectory=/home/minecraft/
Type=simple
ExecStart=/home/minecraft/start.sh
User=minecraft
StandardOutput=journal
StandardError=inherit
RestartSec=30

[Install]
WantedBy=multi-user.target


This file is placed in /lib/systemd/system/minecraft.service



if i Start this service and check the status i get:



EXEC '/home/minecraft/start.sh' no such file or directory


But this file actually exists ...
and the file is working if i start it manually.



Ubuntu version is 18.10



after trying to head -n 1 /home/minecraft/start.sh like suggested it get:



#!/bin/bash


would be cool if someone can help :)










share|improve this question
























  • make sure the filename isn't different from what you have given to systemd!
    – George Udosen
    Nov 23 at 23:57












  • i just reviewed the filenames about 10 times ^^
    – Sandro Schaurer
    Nov 24 at 0:02










  • ok run ls -l /home/minecraft/start.sh and lets see the out put!
    – George Udosen
    Nov 24 at 0:05










  • -rwxrwxr-- 1 minecraft nogroup 85 Nov 24 00:16 /home/minecraft/start.sh ... ^^
    – Sandro Schaurer
    Nov 24 at 2:27










  • ok run head -n 1 /home/minecraft/shart.sh. Edit ( askubuntu.com/posts/1095529/edit ) your post with the results, don't comment.
    – waltinator
    Nov 24 at 4:20















up vote
0
down vote

favorite












so i am trying to get a minecraft server running as a service of systemd



my minecraft.service has this content:



[Unit]
Description=Minecraft Server
After=network.target

[Service]
WorkingDirectory=/home/minecraft/
Type=simple
ExecStart=/home/minecraft/start.sh
User=minecraft
StandardOutput=journal
StandardError=inherit
RestartSec=30

[Install]
WantedBy=multi-user.target


This file is placed in /lib/systemd/system/minecraft.service



if i Start this service and check the status i get:



EXEC '/home/minecraft/start.sh' no such file or directory


But this file actually exists ...
and the file is working if i start it manually.



Ubuntu version is 18.10



after trying to head -n 1 /home/minecraft/start.sh like suggested it get:



#!/bin/bash


would be cool if someone can help :)










share|improve this question
























  • make sure the filename isn't different from what you have given to systemd!
    – George Udosen
    Nov 23 at 23:57












  • i just reviewed the filenames about 10 times ^^
    – Sandro Schaurer
    Nov 24 at 0:02










  • ok run ls -l /home/minecraft/start.sh and lets see the out put!
    – George Udosen
    Nov 24 at 0:05










  • -rwxrwxr-- 1 minecraft nogroup 85 Nov 24 00:16 /home/minecraft/start.sh ... ^^
    – Sandro Schaurer
    Nov 24 at 2:27










  • ok run head -n 1 /home/minecraft/shart.sh. Edit ( askubuntu.com/posts/1095529/edit ) your post with the results, don't comment.
    – waltinator
    Nov 24 at 4:20













up vote
0
down vote

favorite









up vote
0
down vote

favorite











so i am trying to get a minecraft server running as a service of systemd



my minecraft.service has this content:



[Unit]
Description=Minecraft Server
After=network.target

[Service]
WorkingDirectory=/home/minecraft/
Type=simple
ExecStart=/home/minecraft/start.sh
User=minecraft
StandardOutput=journal
StandardError=inherit
RestartSec=30

[Install]
WantedBy=multi-user.target


This file is placed in /lib/systemd/system/minecraft.service



if i Start this service and check the status i get:



EXEC '/home/minecraft/start.sh' no such file or directory


But this file actually exists ...
and the file is working if i start it manually.



Ubuntu version is 18.10



after trying to head -n 1 /home/minecraft/start.sh like suggested it get:



#!/bin/bash


would be cool if someone can help :)










share|improve this question















so i am trying to get a minecraft server running as a service of systemd



my minecraft.service has this content:



[Unit]
Description=Minecraft Server
After=network.target

[Service]
WorkingDirectory=/home/minecraft/
Type=simple
ExecStart=/home/minecraft/start.sh
User=minecraft
StandardOutput=journal
StandardError=inherit
RestartSec=30

[Install]
WantedBy=multi-user.target


This file is placed in /lib/systemd/system/minecraft.service



if i Start this service and check the status i get:



EXEC '/home/minecraft/start.sh' no such file or directory


But this file actually exists ...
and the file is working if i start it manually.



Ubuntu version is 18.10



after trying to head -n 1 /home/minecraft/start.sh like suggested it get:



#!/bin/bash


would be cool if someone can help :)







server java systemd services minecraft






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 24 at 15:47

























asked Nov 23 at 23:56









Sandro Schaurer

64




64












  • make sure the filename isn't different from what you have given to systemd!
    – George Udosen
    Nov 23 at 23:57












  • i just reviewed the filenames about 10 times ^^
    – Sandro Schaurer
    Nov 24 at 0:02










  • ok run ls -l /home/minecraft/start.sh and lets see the out put!
    – George Udosen
    Nov 24 at 0:05










  • -rwxrwxr-- 1 minecraft nogroup 85 Nov 24 00:16 /home/minecraft/start.sh ... ^^
    – Sandro Schaurer
    Nov 24 at 2:27










  • ok run head -n 1 /home/minecraft/shart.sh. Edit ( askubuntu.com/posts/1095529/edit ) your post with the results, don't comment.
    – waltinator
    Nov 24 at 4:20


















  • make sure the filename isn't different from what you have given to systemd!
    – George Udosen
    Nov 23 at 23:57












  • i just reviewed the filenames about 10 times ^^
    – Sandro Schaurer
    Nov 24 at 0:02










  • ok run ls -l /home/minecraft/start.sh and lets see the out put!
    – George Udosen
    Nov 24 at 0:05










  • -rwxrwxr-- 1 minecraft nogroup 85 Nov 24 00:16 /home/minecraft/start.sh ... ^^
    – Sandro Schaurer
    Nov 24 at 2:27










  • ok run head -n 1 /home/minecraft/shart.sh. Edit ( askubuntu.com/posts/1095529/edit ) your post with the results, don't comment.
    – waltinator
    Nov 24 at 4:20
















make sure the filename isn't different from what you have given to systemd!
– George Udosen
Nov 23 at 23:57






make sure the filename isn't different from what you have given to systemd!
– George Udosen
Nov 23 at 23:57














i just reviewed the filenames about 10 times ^^
– Sandro Schaurer
Nov 24 at 0:02




i just reviewed the filenames about 10 times ^^
– Sandro Schaurer
Nov 24 at 0:02












ok run ls -l /home/minecraft/start.sh and lets see the out put!
– George Udosen
Nov 24 at 0:05




ok run ls -l /home/minecraft/start.sh and lets see the out put!
– George Udosen
Nov 24 at 0:05












-rwxrwxr-- 1 minecraft nogroup 85 Nov 24 00:16 /home/minecraft/start.sh ... ^^
– Sandro Schaurer
Nov 24 at 2:27




-rwxrwxr-- 1 minecraft nogroup 85 Nov 24 00:16 /home/minecraft/start.sh ... ^^
– Sandro Schaurer
Nov 24 at 2:27












ok run head -n 1 /home/minecraft/shart.sh. Edit ( askubuntu.com/posts/1095529/edit ) your post with the results, don't comment.
– waltinator
Nov 24 at 4:20




ok run head -n 1 /home/minecraft/shart.sh. Edit ( askubuntu.com/posts/1095529/edit ) your post with the results, don't comment.
– waltinator
Nov 24 at 4:20















active

oldest

votes











Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1095529%2fsystemd-cant-find-my-start-sh-file%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown






























active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded




















































Thanks for contributing an answer to Ask Ubuntu!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.





Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


Please pay close attention to the following guidance:


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1095529%2fsystemd-cant-find-my-start-sh-file%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

How to change which sound is reproduced for terminal bell?

Can I use Tabulator js library in my java Spring + Thymeleaf project?

Title Spacing in Bjornstrup Chapter, Removing Chapter Number From Contents