Skip to content

Instantly share code, notes, and snippets.

@erfanium
Created May 31, 2024 12:15
Show Gist options
  • Save erfanium/a6f3412fc04abf24c8730ec4b3fcb169 to your computer and use it in GitHub Desktop.
Save erfanium/a6f3412fc04abf24c8730ec4b3fcb169 to your computer and use it in GitHub Desktop.
systemd config file for warp-plus

Alright, let's make that happen with systemd on Ubuntu 22.04. Follow these steps:

  1. Create a systemd service file: Open a terminal and create a new service file for your command.

    sudo nano /etc/systemd/system/warp-plus.service
  2. Add the service configuration: Paste the following configuration into the file. Adjust the paths and command options as necessary.

    [Unit]
    Description=Warp Plus Service
    After=network.target
    
    [Service]
    ExecStart=/home/erfanium/Documents/warp-plus/warp-plus -b 127.0.0.1:1234 --gool
    WorkingDirectory=/home/erfanium/Documents/warp-plus
    Restart=always
    User=erfanium
    
    [Install]
    WantedBy=multi-user.target
  3. Reload systemd to recognize the new service:

    sudo systemctl daemon-reload
  4. Enable the service to run at startup:

    sudo systemctl enable warp-plus.service
  5. Start the service now:

    sudo systemctl start warp-plus.service
  6. Check the status to ensure it's running:

    sudo systemctl status warp-plus.service

And that's it! Your warp-plus command will now run on startup. If you hit any bumps, let me know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment