Hexagon / pup

Universal process manager built in Deno
https://pup.56k.guru
MIT License
161 stars 5 forks source link

pup enable-service gives me: Could not install service #66

Open phocks opened 2 days ago

phocks commented 2 days ago

I'm getting:

Could not install service, error: Failed to rollback changes: Could not remove '/root/.config/systemd/user/pup.service'. Error: 'Failed to reload daemon while rolling back.'

When trying to install the service. I'm on Ubuntu Server 24.04, fresh install. Any tips to fix?

Hexagon commented 1 day ago

Are you running enable-service as root? You should either run as a non-privileged user (preferred, as pup installs itself as a user service), or use the --system switch to install pup as a system service. Docs at https://pup.56k.guru/usage/service/ .

Either way, i need to try this out and print a better error message, and make rollback work as intended. Would be nice to have some more details.

phocks commented 1 day ago

Thanks @Hexagon! Using the --system switch worked for me. I was running as root and just trying the normal pup enable-service after doing the initial pup init --id "my-server" --autostart --cmd "deno run -A server.ts". I was running on Ubuntu Server 24.04 inside a LXC Linux Container with the Ubuntu Server 24.04 image. So yeah it's probably that I was running as root as I didn't have a non-root user set up in the container. Thanks for the help.