Skip to content

How to set up server autostart on Ubuntu Server? #115

Closed Pinned Answered by IlyaBOT
IlyaBOT asked this question in Q&A
Discussion options

You must be logged in to vote

Okay, if someone is interested in this issue, I configured HFS autostart on my server. I am using Ubuntu Server 22.04, using the service I ran the HFS startup script, I am attaching the contents of the script and the service below, I hope it will be useful to someone.

ibifs.ddns.net.service:

[Unit]
Description=HFS

[Service]
Type=idle
User=root

ExecStart=/home/ilyabot/Scripts/script.sh
KillMode=process

StandardOutput=syslog
StandardError=syslog
SyslogIdentifier="ibifs.ddns.net"

Restart=on-failure

[Install]
WantedBy=multi-user.target

script.sh:

#!/bin/sh

cd /home/ilyabot/HFS
screen -dmS HFS sudo ./hfs

P.S. Yes, I love using screen.

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Answer selected by IlyaBOT
Comment options

You must be logged in to vote
1 reply
@rejetto
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants