mertxgreen
Active member
Hello, my server having crash and When it having crash, It stop. I have to start my server manual. Is there something about auto-start? How can I use auto-start? Can you help me please?
[Unit]
Description=TeaSpeak Server Service
After=network.target
[Service]
Type=forking
WorkingDirectory=/teaspeak
ExecStart=/teaspeak/teastart.sh start
ExecStop=/teaspeak/teastart.sh stop
User=teaspeak
Group=teaspeak
PIDFile=/teaspeak/tpid.pid
Restart=always
RestartSec=30
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=teaspeak
[Install]
WantedBy=multi-user.target
Thank you for your help. I create file and I upload it. I hope its gonna be helper for me.Hello. Use systemd unit.
Create file /lib/systemd/system/teaspeak.service and put this config:
Pay attention to the folder path teaspeak and restart time they may differCode:[Unit] Description=TeaSpeak Server Service After=network.target [Service] Type=forking WorkingDirectory=/teaspeak ExecStart=/teaspeak/teastart.sh start ExecStop=/teaspeak/teastart.sh stop User=teaspeak Group=teaspeak PIDFile=/teaspeak/tpid.pid Restart=always RestartSec=30 StandardOutput=syslog StandardError=syslog SyslogIdentifier=teaspeak [Install] WantedBy=multi-user.target
It doesnt work any more what should I do?Hello. Use systemd unit.
Create file /lib/systemd/system/teaspeak.service and put this config:
Pay attention to the folder path teaspeak and restart time they may differCode:[Unit] Description=TeaSpeak Server Service After=network.target [Service] Type=forking WorkingDirectory=/teaspeak ExecStart=/teaspeak/teastart.sh start ExecStop=/teaspeak/teastart.sh stop User=teaspeak Group=teaspeak PIDFile=/teaspeak/tpid.pid Restart=always RestartSec=30 StandardOutput=syslog StandardError=syslog SyslogIdentifier=teaspeak [Install] WantedBy=multi-user.target
This is a unit systemd, it works fine on all linux distro where there is a systemd. Check you premission and path to teaspeak folder.It doesnt work any more what should I do?