0

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=0.0.0.0 -w --incremental

That works just fine, but when I enter

/var/www/html/testme2 jekyll serve --host=0.0.0.0 -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?

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

1 Answer 1

0

Well, I don't know why I did

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

but adding this

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

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .