aboutsummaryrefslogtreecommitdiff
path: root/debian/bin
AgeCommit message (Collapse)Author
2020-12-04Use a service unit, not a scope unit, to restartAJ Jordan
Reportedly `systemd-run --scope` still got killed by the service manager; see #4615. The suspected cause is that `scope` units are run by the `systemd-run` process itself and inherit the caller's execution environment (see systemd-run(1)). To fix this, we use a systemd `service` unit instead, which is run and managed by PID 1 - hopefully this will isolate us sufficiently so that we don't get terminated along with `jellyfin.service`.
2020-12-04Use systemd-run(1) in restart.shAJ Jordan
systemd-run(1) runs `systemctl restart` in an isolated systemd unit that is not subject to process termination as jellyfin.service is shut down. We adjust the sudoers configuration for this new usage, removing the old config, since restart.sh is the only user of the sudoers policy. Additionally we change `systemctl start` to `systemctl restart` since there was a race condition where jellyfin.service was not fully stopped by the time this ran, so `systemctl start` became a noop. `systemctl restart` on the other hand works whether jellyfin.service is stopped or not. The at(1) hack (and the usage of `start` instead of `restart`) is left in for other init systems since I cannot test on those systems, and because I don't know of any systemd-run(1) equivalent (although it may be a non-issue since alternate init systems do not keep track of daemon children nearly as aggressively as systemd does).
2020-11-29Don't restart with sudo(8) if it's not availableAJ Jordan
Some environments, like system containers, have no reason to have sudo(8) installed. In these environments restart.sh will silently fail because /usr/bin/sudo does not exist to execute, so test that sudo exists and don't try to use it otherwise. Note also that hardcoding sudo's path is wrong: it can be installed in other places. On FreeBSD, for example, it is /usr/local/bin/sudo when installed from ports.
2020-11-29Remove useless which(1) calls in restart.shAJ Jordan
at(1) runs commandlines with /bin/sh anyway, which resolves paths. No need to do it ourselves.
2020-11-29Fix restart.sh to look at what's actually bootedAJ Jordan
The old code was wrong because e.g. systemd can be *installed* on the system, but not actually used as PID1. In that case we would pick `systemctl`, but it wouldn't actually work because PID1 was some other init system.
2020-11-22Go back to at with lower sleep and startJoshua M. Boniface
2020-11-22Remove the `at now` hackJoshua M. Boniface
2020-11-22Run explicit service start if restart failedJoshua M. Boniface
Should solve the occasional bugs with the restart in the WebUI. Sometimes the service stops and then doesn't start again; this will run an explicit start action afterwards. If this doesn't fix it I'm certain there would be more tweaking that can be done.
2020-04-09Fix missing restart scriptJoshua M. Boniface
2019-01-10Build scripts and build system consolidation.Erwin de Haan
Squashed commit.
2018-12-09Organize supplementary files betterJoshua Boniface
2018-12-09Remove obsolete binaryJoshua Boniface
2018-12-09A few more missing replacements of EmbyJoshua Boniface
2018-12-09Rename numerous debian control elementsJoshua Boniface
Replace the name emby/emby-server with jellyfin everywhere.
2018-12-09Revert "Debian packaging improvements"Joshua M. Boniface
2018-12-09Rename numerous debian control elementsJoshua Boniface
Replace the name emby/emby-server with jellyfin everywhere.
2018-10-22Add binary script which was missing due to gitignoreJoshua Boniface