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.

Controlling Plugin Start sequence

Featured Replies

normal convention in the RedHat rc.d directories is

 

S##name (for starting)

k##name (for killing)

 

rcotrone@underlord rc2.d $ ls -l
total 0
lrwxrwxrwx 1 root root 17 Mar 24  2010 K01dnsmasq -> ../init.d/dnsmasq
lrwxrwxrwx 1 root root 16 Jul  3 11:30 K01smartd -> ../init.d/smartd
lrwxrwxrwx 1 root root 22 Mar 24  2010 K02avahi-daemon -> ../init.d/avahi-daemon
lrwxrwxrwx 1 root root 24 Mar 24  2010 K02avahi-dnsconfd -> ../init.d/avahi-dnsconfd
lrwxrwxrwx 1 root root 24 Mar 24  2010 K02NetworkManager -> ../init.d/NetworkManager
lrwxrwxrwx 1 root root 17 Mar 24  2010 K02oddjobd -> ../init.d/oddjobd
lrwxrwxrwx 1 root root 13 Mar 24  2010 K05atd -> ../init.d/atd
lrwxrwxrwx 1 root root 16 Mar 24  2010 K05conman -> ../init.d/conman
lrwxrwxrwx 1 root root 14 Mar 24  2010 K05innd -> ../init.d/innd
lrwxrwxrwx 1 root root 19 Mar 24  2010 K05saslauthd -> ../init.d/saslauthd
lrwxrwxrwx 1 root root 14 Mar 24  2010 K10cups -> ../init.d/cups
lrwxrwxrwx 1 root root 19 Mar 24  2010 K10dc_server -> ../init.d/dc_server
lrwxrwxrwx 1 root root 15 Mar 24  2010 K10hplip -> ../init.d/hplip
lrwxrwxrwx 1 root root 16 Mar 24  2010 K10psacct -> ../init.d/psacct
lrwxrwxrwx 1 root root 14 Mar 24  2010 K10tcsd -> ../init.d/tcsd
lrwxrwxrwx 1 root root 19 Mar 24  2010 K12dc_client -> ../init.d/dc_client
lrwxrwxrwx 1 root root 15 Mar 24  2010 K15httpd -> ../init.d/httpd
lrwxrwxrwx 1 root root 15 Mar 24  2010 K20rwhod -> ../init.d/rwhod
lrwxrwxrwx 1 root root 14 Mar 24  2010 K24irda -> ../init.d/irda
lrwxrwxrwx 1 root root 15 Mar 24  2010 K25squid -> ../init.d/squid
lrwxrwxrwx 1 root root 13 Mar 24  2010 K28amd -> ../init.d/amd
lrwxrwxrwx 1 root root 22 Mar 24  2010 K30spamassassin -> ../init.d/spamassassin
lrwxrwxrwx 1 root root 15 Jul  4  2010 K35dhcpd -> ../init.d/dhcpd
lrwxrwxrwx 1 root root 18 Jul  4  2010 K35dhcrelay -> ../init.d/dhcrelay
lrwxrwxrwx 1 root root 17 Mar 24  2010 K35dovecot -> ../init.d/dovecot
lrwxrwxrwx 1 root root 13 Mar 24  2010 K35smb -> ../init.d/smb
lrwxrwxrwx 1 root root 19 Mar 24  2010 K35vncserver -> ../init.d/vncserver
lrwxrwxrwx 1 root root 17 Mar 24  2010 K35winbind -> ../init.d/winbind
lrwxrwxrwx 1 root root 14 Mar 24  2010 K36lisa -> ../init.d/lisa
lrwxrwxrwx 1 root root 20 Mar 24  2010 K44rawdevices -> ../init.d/rawdevices
lrwxrwxrwx 1 root root 20 Mar 24  2010 K50netconsole -> ../init.d/netconsole
lrwxrwxrwx 1 root root 15 Mar 24  2010 K50snmpd -> ../init.d/snmpd
lrwxrwxrwx 1 root root 19 Mar 24  2010 K50snmptrapd -> ../init.d/snmptrapd
lrwxrwxrwx 1 root root 13 Mar 24  2010 K50tux -> ../init.d/tux
lrwxrwxrwx 1 root root 16 Mar 24  2010 K50xinetd -> ../init.d/xinetd
lrwxrwxrwx 1 root root 20 Mar 24  2010 K69rpcsvcgssd -> ../init.d/rpcsvcgssd
lrwxrwxrwx 1 root root 16 Mar 24  2010 K72autofs -> ../init.d/autofs
lrwxrwxrwx 1 root root 16 Mar 24  2010 K73ypbind -> ../init.d/ypbind
lrwxrwxrwx 1 root root 14 Jul  3 11:30 K74ipmi -> ../init.d/ipmi
lrwxrwxrwx 1 root root 14 Jul  4  2010 K74nscd -> ../init.d/nscd
lrwxrwxrwx 1 root root 14 Mar 24  2010 K74ntpd -> ../init.d/ntpd
lrwxrwxrwx 1 root root 15 Mar 24  2010 K75netfs -> ../init.d/netfs
lrwxrwxrwx 1 root root 15 Mar 24  2010 K80kdump -> ../init.d/kdump
lrwxrwxrwx 1 root root 13 Jul  5  2010 K80ss5 -> ../init.d/ss5
lrwxrwxrwx 1 root root 15 Mar 24  2010 K85mdmpd -> ../init.d/mdmpd
lrwxrwxrwx 1 root root 20 Jul  4  2010 K85messagebus -> ../init.d/messagebus
lrwxrwxrwx 1 root root 17 Mar 24  2010 K85rpcgssd -> ../init.d/rpcgssd
lrwxrwxrwx 1 root root 19 Mar 24  2010 K85rpcidmapd -> ../init.d/rpcidmapd
lrwxrwxrwx 1 root root 18 Mar 24  2010 K87mcstrans -> ../init.d/mcstrans
lrwxrwxrwx 1 root root 20 Mar 24  2010 K87multipathd -> ../init.d/multipathd
lrwxrwxrwx 1 root root 15 Mar 24  2010 K87named -> ../init.d/named
lrwxrwxrwx 1 root root 17 Mar 24  2010 K87portmap -> ../init.d/portmap
lrwxrwxrwx 1 root root 15 Jul  4  2010 K88pcscd -> ../init.d/pcscd
lrwxrwxrwx 1 root root 24 Mar 24  2010 K88wpa_supplicant -> ../init.d/wpa_supplicant
lrwxrwxrwx 1 root root 18 Mar 24  2010 K89netplugd -> ../init.d/netplugd
lrwxrwxrwx 1 root root 15 Mar 24  2010 K89rdisc -> ../init.d/rdisc
lrwxrwxrwx 1 root root 19 Mar 24  2010 K92ip6tables -> ../init.d/ip6tables
lrwxrwxrwx 1 root root 18 Mar 24  2010 K92iptables -> ../init.d/iptables
lrwxrwxrwx 1 root root 19 Mar 24  2010 K95firstboot -> ../init.d/firstboot
lrwxrwxrwx 1 root root 15 Mar 24  2010 K95kudzu -> ../init.d/kudzu
lrwxrwxrwx 1 root root 18 Mar 24  2010 K99cpuspeed -> ../init.d/cpuspeed
lrwxrwxrwx 1 root root 25 Mar 24  2010 K99readahead_later -> ../init.d/readahead_later
lrwxrwxrwx 1 root root 23 Mar 24  2010 S00microcode_ctl -> ../init.d/microcode_ctl
lrwxrwxrwx 1 root root 22 Jul  4  2010 S02lvm2-monitor -> ../init.d/lvm2-monitor
lrwxrwxrwx 1 root root 17 Mar 24  2010 S03sysstat -> ../init.d/sysstat
lrwxrwxrwx 1 root root 25 Mar 24  2010 S04readahead_early -> ../init.d/readahead_early
lrwxrwxrwx 1 root root 22 Mar 24  2010 S08arptables_jf -> ../init.d/arptables_jf
lrwxrwxrwx 1 root root 17 Mar 24  2010 S10network -> ../init.d/network
lrwxrwxrwx 1 root root 21 Mar 24  2010 S12restorecond -> ../init.d/restorecond
lrwxrwxrwx 1 root root 16 Jul  4  2010 S12syslog -> ../init.d/syslog
lrwxrwxrwx 1 root root 20 Mar 24  2010 S13irqbalance -> ../init.d/irqbalance
lrwxrwxrwx 1 root root 17 Jul 10  2010 S14nfslock -> ../init.d/nfslock
lrwxrwxrwx 1 root root 19 Jul  4  2010 S15mdmonitor -> ../init.d/mdmonitor
lrwxrwxrwx 1 root root 16 Mar 24  2010 S19vmware -> ../init.d/vmware
lrwxrwxrwx 1 root root 15 Mar 24  2010 S26acpid -> ../init.d/acpid
lrwxrwxrwx 1 root root 19 Mar 24  2010 S26haldaemon -> ../init.d/haldaemon
lrwxrwxrwx 1 root root 20 Mar 24  2010 S26lm_sensors -> ../init.d/lm_sensors
lrwxrwxrwx 1 root root 14 Mar 24  2010 S55sshd -> ../init.d/sshd
lrwxrwxrwx 1 root root 13 Jul 10  2010 S60nfs -> ../init.d/nfs
lrwxrwxrwx 1 root root 16 Jul  4  2010 S60vsftpd -> ../init.d/vsftpd
lrwxrwxrwx 1 root root 18 Mar 24  2010 S80sendmail -> ../init.d/sendmail
lrwxrwxrwx 1 root root 13 Mar 24  2010 S85gpm -> ../init.d/gpm
lrwxrwxrwx 1 root root 15 Mar 24  2010 S90crond -> ../init.d/crond
lrwxrwxrwx 1 root root 13 Mar 24  2010 S90xfs -> ../init.d/xfs
lrwxrwxrwx 1 root root 17 Mar 24  2010 S95anacron -> ../init.d/anacron
lrwxrwxrwx 1 root root 22 Mar 24  2010 S97yum-updatesd -> ../init.d/yum-updatesd
lrwxrwxrwx 1 root root 11 Mar 24  2010 S99local -> ../rc.local
rcotrone@underlord rc2.d $ 

 

in slackware per vmware tools installed.

rcotrone@slacky:/etc/rc.d/rc2.d$ ls -l
total 0
lrwxrwxrwx 1 root root 29 2008-04-30 10:55 K08vmware-tools -> /etc/rc.d/init.d/vmware-tools*
lrwxrwxrwx 1 root root 29 2008-04-30 10:55 S19vmware-tools -> /etc/rc.d/init.d/vmware-tools*

 

ah yeah there ya go.  I was taking my cue from init.d usage in android.

 

Now of course it is time to test ... i'm game when i get home. 

Pretty much all the bash scripting I know I learnt the evening I wrote that plugin so you are welcome to try and improve it, I dont know enough to say whether you're right or not :)

 

I did do a fair bit of testing by inserting an additional echo into the loop as a debug, basically running it on my unRAID server with the Internet online resulted in it finishing immediately, if I started it then enabled Internet access halfway through it appeared to finish then rather than wait the full 100 seconds, but I could be wrong there.

 

What originally gave me the idea for it was an old UUmenu script that waited for the array to come online before doing anything else, I think with the new plugin framework the system already waits for the array to mount before running the plugins, hence why others have been struggling to get SNAP running as a plugin.

 

The plugins are processed in alphabetical order, which is why I named it anetwait.plg :)

A way to test when it finishes is at the start of the script write

 

set -x

 

If you do that and run the script, it will print out exactly what is happening, including the increments it counts so you could see where it is finishing, as well as if "x" changes.

easy way ;)

 

change names of plugins

 

example :

sabnzbd.plg

sickbeard.plg

transmission.plg

 

on:

01_sabnzbd.plg

02_sickbeard.plg

03_transmission.plg

 

etc ;)

 

 

 

 

In the case of my plugins where they can be updated from the GUI, that method wouldnt work without renaming the plugin everytime you update. It would also break the downgrade as well.

 

 

but that is the only really reliable way to control order of startup/shutdown on plugins just like linux system does it now for itself.

 

I dont remember it off the top of my head, but there is a php function to get the name of its own filename that way you can keep the numeric prefix on the front.

 

Myk

 

In the case of my plugins where they can be updated from the GUI, that method wouldnt work without renaming the plugin everytime you update. It would also break the downgrade as well.

Make more flexible update system for plugins :)

 

example for looking names plugin to update "*headphones_unplugged.plg" (then problem will be resolved, if somebody added to name number on start) and add posibility keep changed name by user after update.

I never said it was difficult, but at this point with an official plugin manager being around the corner (hopefully anyway) it seems pointless to add to a feature that is likely to be included.

 

And along with that, how many programs do you run that support you renaming key files? ;)

  • 4 months later...

I know this is an old topic but I thought this would be pertinent. I like the idea of waiting for the the network to become active before starting the other plugins but the issue I have, as well as others, is waiting for the array to be active before the plugins load. Does anyone know of a way to wait until the array is fully started before attempting to start any other plugins? I know I can just add a sleep but I am referring to a proper way of doing thing like querying the array status.

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.