Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Post Arguments works inconsistently

Featured Replies

I run the official Emby container with the following Post Arguments to call a custom script which prunes the transcoding directory:

 

&& docker exec EmbyServer sh -c 'watch -n30 "/system-share/transcoding-temp-fix.sh" > /transcode/transcoding-temp-fix.log &'

 

The problem is it doesn't run on restart.

However, if I edit the container and click Apply it runs every time.

 

Am I doing something obviously wrong and if not how should I go about debugging it?

I don't see anything suspicious in the container or unraid's system log.

  • Community Expert

I am fairly certain that is not how the Post Arguments field is meant to be used. Its purpose is to add extra arguments to the end of the Docker run command, not append a completely new docker command. The problem you are facing stems from the fact that the Post Arguments become part of the docker run command, and thus only executes when the container is recreated not when it starts or stops. Unfortunately i am not really certain how to achieve what you are trying to do aside from forking the official Emby container and integrating your script.

  • Author

Well that explains that.

 

If there's no reliable way to do it with the template (I don't really know docker or unraid's specific implementation) I guess I could cron a user script that calls it with docker exec, but it would have to be more complex to guard against multiple instances.

 

Thanks.

  • Community Expert

It looks like the emby/embyserver container may be based on a base image with an s6-overlay. If that is the case you could potentially put your script launch command 

watch -n30 "/system-share/transcoding-temp-fix.sh" > /transcode/transcoding-temp-fix.log &

into a launch script and bind mount that into the container under the /etc/cont-init.d directory. If i understand s6 correctly it would run your script when the container starts.

https://github.com/just-containers/s6-overlay#init-stages

Archived

This topic is now archived and is closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.