Starting Hexo On Boot

Create a shell to execute the Hexo server

1
2
3
4
cd ~
vi start_hexo.sh
#!/bin/bash
cd /home/hexoadm/hexo01/ && /usr/local/bin/hexo server

Make the script executable

1
chmod +x start_hexo.sh

Edit your user’s crontab file to start Hexo on boot

1
2
3
4
5
6
7
8
crontab -u hexoadm -e
must be privileged to use -u

su -
Password:

crontab -u hexoadm -e
@reboot sh start_hexo.sh