Create a shell script to execute the Hexo server.
1
2cd ~
nano starthexo.shThe contents can be as simple as the following:
1
2
3#!/bin/bash
cd /path/to/hexo/workspace
hexo serverMake the script executable.
1
chmod u+x starthexo.sh
Edit your user’s crontab file to start Hexo on boot.
1
crontab -u myusername -e
Add the following line to the bottom of your crontab file.
1
@reboot sh starthexo.sh
| Home | Archives | Categories | Tags | About |
|