Can't autostart Resilio Sync in openSUSE Tumbleweed


Recommended Posts

Hello dear team!

I'm trying to install Resilio Sync in openSUSE Tumbleweed it according to the instructions. I've done this a million times before, everything was perfect. But I did it on debian-like systems. Now there is a task to install the service on openSUSE tumbleweed and I can not force it to run at system startup. The error description is below. I will be very grateful for any help, I am a complete beginner in openSUSE.

XXX:~> sudo systemctl enable resilio-sync
[sudo] password for root: 
Synchronizing state of resilio-sync.service with SysV service script with /usr/lib/systemd/systemd-sysv-install.
Executing: /usr/lib/systemd/systemd-sysv-install enable resilio-sync
/usr/lib/systemd/systemd-sysv-install: line 31: chkconfig: command not found

 

If I try to start service by manual like:

sudo systemctl start resilio-sync
 

all fine, but after reboot need to start it again... it's bad practices.

Thanks! It's asap question for me.

 

Operating System: openSUSE Tumbleweed 20210505
KDE Plasma Version: 5.21.4
KDE Frameworks Version: 5.81.0
Qt Version: 5.15.2
Kernel Version: 5.12.0-2-default
OS Type: 64-bit
Graphics Platform: X11
Processors: 16 × AMD Ryzen 7 PRO 4750U with Radeon Graphics
Memory: 22.7 GiB of RAM
Graphics Processor: AMD RENOIR

 

Link to comment
Share on other sites

  • 3 weeks later...
  • 3 weeks later...
  • 3 weeks later...

It is possible to run Resilio Sync automatically during startup.
First, you will create a shell script file, which should run systemd at startup. "Captain" is a pretty appropriate name for it, because a captain gives orders.

1. Copy and paste the following command line into the terminal to create a shell script file called captain.sh:
sudo touch /opt/captain.sh

Press Enter and enter your password if prompted. In Ubuntu this remains completely invisible, you don't even see asterisks when you type it, that's how it should be. This has changed in Mint: you do see asterisks. Press Enter again.
(if you type: don't forget the space after touch!)

2. Copy and paste the following command line into the terminal to edit the new empty document file:
xed admin:///opt/captain.sh
(the three consecutive slashes in the command line are not a mistake)

Press Enter. You must enter your password twice.
3. Now copy and paste the blue text below into that empty document file. This text block contains an example command, which lowers the transmit power of a wireless card called wlp2s0.
With a delay ("sleep") of 20 seconds, so that the system is fully operational when the command is executed (this reduces the chance of problems, so such a delay is useful for almost all commands imaginable):

#!/bin/sh
sleep 20
service resilio sync start
exit 0

Note: there should be no sudo before the command line! This is unnecessary and even wrong for systemd.
Save and close the modified file.

4. Copy and paste the following command line into the terminal to make the new shell script executable:
sudo chmod u+x /opt/captain.sh
Press Enter.

5. Copy and paste the following command line into the terminal, to create a new service file for systemd:
sudo touch /etc/systemd/system/captain.service
Press Enter.

6. Copy and paste the following command line into the terminal to edit the new service file:
xed admin:///etc/systemd/system/captain.service
Press Enter.

7. Copy and paste the blue text block below into the empty text file:
[Unit] Description=Captain Service After=network.target
[Service] ExecStart=/opt/captain.sh
[Install] WantedBy=multi-user.target
Save and close the modified file.

8. Copy and paste the following command line into the terminal to start the new service:
sudo systemctl start captain
Press Enter.

9. Copy and paste the following command line into the terminal to have the new service start automatically when your computer boots up:
sudo systemctl enable captain
Press Enter.

10. Restart your computer.
11. Check whether the assignment has actually been carried out. Please note that you have to wait a while: the command will only be executed 20 seconds after your login!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.