He agregado un nuevo script a /etc/init/
llamado minecraft.conf
que contiene el script:
start on startup
stop on shutdown
respawn
respawn limit 20 5
script
export HOME="/root"
exec /root/minecraft/start.sh 2>&1 >> /var/log/minecraft.log
end script
post-start script
echo "minecraft started"
Cuando lo intento start minecraft
me sale el error:start: Unknown job: minecraft
He intentado correr initctl list
y mi trabajo de Minecraft no está en la lista. He intentado correr initctl reload-configuration
y no hace ninguna diferencia.
Otros trabajos enumerados por initctl list
trabajo funcionan bien con iniciar, detener y reiniciar.
¿Por qué el advenedizo no ve mi nuevo script?
/etc/init.d/
?
/etc/init
y ahora está listo para reiniciar y usar el programa".
sudo start minecraft
sin problemas. Aquí está el contenido del archivo de registro. ~$ sudo cat /var/log/upstart/minecraft.log minecraft started /proc/self/fd/9: 3: exec: /root/minecraft/start.sh: not found minecraft started
¿Puede proporcionar más detalles sobre la versión de Ubuntu que está utilizando y alguna información útil de syslog?