Hi
I have remote access with ssh in my server. I also have this command that I need to run on startup
and I am trying to find a way to run it automatically on start up.
Unfortunately it doesn't run. What I tried so far:
I created a file /etc/rc.local with
and
I created the file /usr/local/etc/rc.d/qssite with content
Still doesn't start on boot.
If I do
I have remote access with ssh in my server. I also have this command that I need to run on startup
uwsgi --emperor /usr/local/etc/uwsgi/vassals/ --uid www --gid wwwand I am trying to find a way to run it automatically on start up.
Unfortunately it doesn't run. What I tried so far:
I created a file /etc/rc.local with
Code:
#!/bin/sh
uwsgi --emperor /usr/local/etc/uwsgi/vassals/ --uid www --gid www
chmoded it to 755. Doesn't workI created the file /usr/local/etc/rc.d/qssite with content
Code:
#!/bin/sh
# PROVIDE: qssite
. /etc/rc.subr
name="qssite"
start_cmd="${name}_start"
stop_cmd="${name}_stop"
qssite_start() {
echo "qssite starting"
# your commands here
uwsgi --emperor /usr/local/etc/uwsgi/vassals/ --uid www --gid www
}
qssite_stop() {
echo "qssite stopping"
# your commands here
}
run_rc_command "$1"
# eof
chmoded to +x and even added to /etc/rc.conf:
Code:
qssite_enable="YES"
If I do
sudo /usr/local/etc/rc.d/qssite start it works. But I want it to run automatically on boot.