V
V
Vanes Ri_Lax2018-12-21 09:04:49
ubuntu
Vanes Ri_Lax, 2018-12-21 09:04:49

How to add Sprut.io to startup?

Hello server running os Ubuntu. The sprut.io file manager is installed on the server. If you run the run.sh script, then everything works, but when you restart the server, you need to run the script manually. How to put it in autorun?
Thank you very much in advance!

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
vanoc, 2018-12-21
@Zoro

The easiest way is via cron in /etc/crontab
@reboot user /path/to/run.sh

P
pfg21, 2018-12-21
@pfg21

write a service script for systemd

/etc/systemd/system/simple_srv.service
[Unit]
Description=Simple service
# After=network.target
[Service]
#User=nobody
#Group=nogroup
ExecStart=/path/to/script
[Install]
WantedBy=multi-user.targe

then
$ sudo systemctl daemon-reload -- reread the service scripts
$ sudo systemctl enable simple_srv.service -- enable autostart at system startup.
$ sudo systemctl start simple_srv.service -- start the service right now.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question