Last active
February 9, 2025 10:15
-
-
Save iamnimnul/64953db3d1c1b3c3a99dd6b086c9678b to your computer and use it in GitHub Desktop.
Revisions
-
iamnimnul revised this gist
Feb 9, 2025 . 1 changed file with 4 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,3 +1,7 @@ Install mega-cmd from official website https://mega.io/cmd#download. For Raspberry Pi use Linux > Raspbian. To create background service: ```bash # Create the service file (copy content) # WARNING: UPDATE LINE 7 "User=root" if you want to run it as different user -
iamnimnul created this gist
Feb 9, 2025 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,29 @@ ```bash # Create the service file (copy content) # WARNING: UPDATE LINE 7 "User=root" if you want to run it as different user sudo nano /etc/systemd/system/mega.service # Set proper permissions sudo chmod 644 /etc/systemd/system/mega.service # Reload systemd to recognize the new service sudo systemctl daemon-reload # Enable the service to start on boot sudo systemctl enable mega # Start the service sudo systemctl start mega # Check status sudo systemctl status myservice # Stop service sudo systemctl stop myservice # Restart service sudo systemctl restart myservice # View logs journalctl -u myservice ``` This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,15 @@ [Unit] Description=Mega CMD Server After=network.target [Service] Type=simple User=root ExecStart=/usr/bin/mega-cmd-server Restart=on-failure RestartSec=5 StandardOutput=append:/var/log/mega.log StandardError=append:/var/log/mega-error.log [Install] WantedBy=multi-user.target