I only have SFTP access and SSH access, it's virtual server running Ubuntu 16.04.

I'm trying to get jekyll to auto-start whenever I start/reboot the server.

In the ssh terminal I can just enter

cd /var/www/html/testme2 && jekyll serve --host= -w --incremental

That works just fine, but when I enter

/var/www/html/testme2 jekyll serve --host= -w --incremental

into the rc.local. Nothing happens. I tested if rc.local is being executed with echo "rc.local runnin" > /var/www/html/running.txt , and the file was created with the entry in it.

I tested sh rc.local and this was the output

rc.local: 14: rc.local: /var/www/html/testme: Permission denied

What am I doing wrong?

  • /var/www/html/testme/ and cd /var/www/html/testme are different things Mar 27 '18 at 17:58
  • I know, but neither variant works. Mar 27 '18 at 21:33
  • The & is critical too. Why didn't you just type what works at the command line?
    – ubfan1
    Mar 27 '18 at 22:14
  • Because it doesn't work. With or without it. Mar 28 '18 at 9:45

Well, I don't know why I did

/var/www/html/testme2 jekyll serve --host= -w --incremental

but adding this

cd /var/www/html/testme2 && jekyll serve --host= -w --incremental

to rc.local works just fine, and jekyll auto-starts.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.