[PR #4615] [MERGED] Improve restart.sh #10194

Closed
opened 2026-02-07 06:15:45 +03:00 by OVERLORD · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/jellyfin/jellyfin/pull/4615
Author: @strugee
Created: 11/29/2020
Status: Merged
Merged: 9/6/2021
Merged by: @cvium

Base: masterHead: fix-restart.sh


📝 Commits (6)

  • a4e1732 Fix restart.sh to look at what's actually booted
  • ce82932 Remove useless which(1) calls in restart.sh
  • 2911dfc Don't restart with sudo(8) if it's not available
  • b528816 Add sudo to package dependencies
  • d251c70 Use systemd-run(1) in restart.sh
  • bab3891 Use a service unit, not a scope unit, to restart

📊 Changes

6 files changed (+68 additions, -29 deletions)

View changed files

📝 debian/bin/restart.sh (+30 -10)
📝 debian/conf/jellyfin-sudoers (+3 -3)
📝 debian/control (+1 -1)
📝 fedora/jellyfin.spec (+1 -1)
📝 fedora/jellyfin.sudoers (+3 -4)
📝 fedora/restart.sh (+30 -10)

📄 Description

Changes

Fix restart.sh to be more robust. In particular:

  • Make sure sudo is installed (there is also code in there to handle sudo not being installed, for obscure running-as-root configurations - I wrote it before I realized I was being dumb and wasn't actually running as root, but it seemed like since it was already written it might as well stay in the PR)
  • Fix init system detection to look at what's actually running, not what's installed
  • Misc cleanups
  • Remove the | at now hack for systemd and fix some race conditions

I've split up the changes into individual commits, all of which have an extended description, so I won't repeat what they already say here.

I did test these changes in my production Debian system. I then copied the changes to the Fedora configs, but I did not test those since I didn't want to spin up a Fedora box and deploy Jellyfin from scratch. But they should apply equally well to that platform.

Issues

None that I found, but see also #4554; cc @joshuaboniface


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/jellyfin/jellyfin/pull/4615 **Author:** [@strugee](https://github.com/strugee) **Created:** 11/29/2020 **Status:** ✅ Merged **Merged:** 9/6/2021 **Merged by:** [@cvium](https://github.com/cvium) **Base:** `master` ← **Head:** `fix-restart.sh` --- ### 📝 Commits (6) - [`a4e1732`](https://github.com/jellyfin/jellyfin/commit/a4e1732e3553b7c039d23f89082fe23b058aac59) Fix restart.sh to look at what's actually booted - [`ce82932`](https://github.com/jellyfin/jellyfin/commit/ce82932c9a4a33fd142d56e5b0683429329751ee) Remove useless which(1) calls in restart.sh - [`2911dfc`](https://github.com/jellyfin/jellyfin/commit/2911dfc37d79bb4069a0ca1272ee6609f0400a39) Don't restart with sudo(8) if it's not available - [`b528816`](https://github.com/jellyfin/jellyfin/commit/b528816b2a59c295ff37b8ca24fbc964094e1272) Add sudo to package dependencies - [`d251c70`](https://github.com/jellyfin/jellyfin/commit/d251c701b940fc1d7d1f29799785d4bc290b8ce6) Use systemd-run(1) in restart.sh - [`bab3891`](https://github.com/jellyfin/jellyfin/commit/bab389114b5833735d55d982ba1a2c17fd22e0d2) Use a service unit, not a scope unit, to restart ### 📊 Changes **6 files changed** (+68 additions, -29 deletions) <details> <summary>View changed files</summary> 📝 `debian/bin/restart.sh` (+30 -10) 📝 `debian/conf/jellyfin-sudoers` (+3 -3) 📝 `debian/control` (+1 -1) 📝 `fedora/jellyfin.spec` (+1 -1) 📝 `fedora/jellyfin.sudoers` (+3 -4) 📝 `fedora/restart.sh` (+30 -10) </details> ### 📄 Description **Changes** Fix `restart.sh` to be more robust. In particular: * Make sure `sudo` is installed (there is also code in there to handle `sudo` not being installed, for obscure running-as-root configurations - I wrote it before I realized I was being dumb and _wasn't_ actually running as root, but it seemed like since it was already written it might as well stay in the PR) * Fix init system detection to look at what's actually running, not what's installed * Misc cleanups * Remove the `| at now` hack for systemd and fix some race conditions I've split up the changes into individual commits, all of which have an extended description, so I won't repeat what they already say here. I _did_ test these changes in my production Debian system. I then copied the changes to the Fedora configs, but I did not test those since I didn't want to spin up a Fedora box and deploy Jellyfin from scratch. But they should apply equally well to that platform. **Issues** None that I found, but see also #4554; cc @joshuaboniface --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
OVERLORD added the pull-request label 2026-02-07 06:15:45 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/jellyfin#10194