Estou tentando criar um serviço personalizado no meu VPS. No entanto, não me deixa executá-lo. Diz o seguinte. Não tenho certeza do que está acontecendo, mas quando eu o executo no meu laptop Ubuntu ele funciona corretamente. Qual poderia ser o problema?
sudo systemctl start websocket.service
Failed to issue method call: Unit websocket.service failed to load: No such file or directory. See system logs and 'systemctl status websocket.service' for details.
cat /lib/systemd/system/websocket.service
[Unit]
Description=php webSocket
After=syslog.target network.target
[Service]
User=root
Type=simple
ExecStart=/webs.sh
TimeoutStopSec=20
KillMode=process
Restart=always
RestartSec=2
[Install]
WantedBy=multi-user.target
Alias=websocket.service
cat /webs.sh
#!/usr/bin/php /server.php
### BEGIN INIT INFO
# Provides: webSocket
# Required-Start: $local_fs $network
# Required-Stop: $local_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: php webSocket
# Description: php webSocket
### END INIT INFO
Eu tentei systemctl daemon-reload
, mas recebo o seguinte :
Attempted to remove disk file system, and we can't allow that.
Ignoring /etc/systemd/system/multi-user.target.wants/ssh.service -> /lib/systemd/system/ssh.service for systemd deputy init
Ignoring /etc/systemd/system/multi-user.target.wants/rsyslog.service -> /lib/systemd/system/rsyslog.service for systemd deputy init
Ignoring /etc/systemd/system/multi-user.target.wants/bind9.service -> /lib/systemd/system/bind9.service for systemd deputy init
Ignoring /etc/systemd/system/timers.target.wants/phpsessionclean.timer -> /lib/systemd/system/phpsessionclean.timer for systemd deputy init
Eu também reiniciei o servidor, mas nada, alguém pode me dar alguma dica do que está acontecendo?