Frans Linux

Members
  • Posts

    1
  • Joined

  • Last visited

Frans Linux's Achievements

New User

New User (1/3)

  1. 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!