Looking for method to restart wiki on reboot other than using standard install script
Opened this issue · 1 comments
andysylvester commented
I had to recreate my wiki site (http://fedwiki.andysylvester.com, not currently running), so I decided to work out a way to install wiki without the standard install script (see http://forage.ward.fed.wiki.org/view/deploying-a-wiki). I have worked out a method for doing the install and setting up wiki to continue running after logging out from the terminal (created a script to run the commands). The script is as follows:
nohup wiki -p 80 > allout.txt 2>&1 &
disown %1
The last issue I am working on is how to start wiki again if the server is rebooted.
I have tried several methods, but have not had success:
- Added a @reboot entry in crontab to call the above script
- Added a call to the above script to /etc/rc.local:
sh /root/mywiki.sh
I would appreciate any other ideas.
Andy Sylvester
nrn commented
Not sure if you know why those failed? My first guess would be permissions,
I don't think those will run the script as root, and would require more
setup.
I think the best way to run wiki on restart is to use your linux system of
choice's default processes manager, init.d, upstart, system.d, etc. And
write a config file that starts the wiki on boot, and restarts on crash.
The simple install script adds a file to do this with upstart, which i
think has since fallen out of style. If you get a working config file for
another system be sure to share it!
…On Sun, Jan 1, 2017 at 8:42 PM Andy Sylvester ***@***.***> wrote:
I had to recreate my wiki site (http://fedwiki.andysylvester.com, not
currently running), so I decided to work out a way to install wiki without
the standard install script (see
http://forage.ward.fed.wiki.org/view/deploying-a-wiki). I have worked out
a method for doing the install and setting up wiki to continue running
after logging out from the terminal (created a script to run the commands).
The script is as follows:
nohup wiki -p 80 > allout.txt 2>&1 &
disown %1
The last issue I am working on is how to start wiki again if the server is
rebooted.
I have tried several methods, but have not had success:
1. Added a @reboot <https://github.com/reboot> entry in crontab to
call the above script
2. Added a call to the above script to /etc/rc.local:
sh /root/mywiki.sh
I would appreciate any other ideas.
Andy Sylvester
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#95>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAV03MsHM9MF93EP2dTGUkcCM-5lnDBAks5rOHI7gaJpZM4LY0_s>
.