Startup script location #3
-
|
So I have noticed that all the scripts runs on startup. Does anyone know where the file location would be? |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 63 replies
-
|
Good to hear from you! I'm not entirely sure I understand the question. Are you asking how they work in my Debian installers? For those projects I have it setup for them to be installed into They Python scripts themselves aren't actually Debian/SystemD specific, you could hypothetically use them with other linux distros or even other Operating Systems if you adjust the device names in the scripts. In that case you'd use that systems startup/shutdown mechanisms to call them. Let me know if that answers the question. |
Beta Was this translation helpful? Give feedback.
-
|
I went ahead and wrote a script which shutsdown the system if you hold the power button: if you put it in /usr/local/bin, mark it executable and run it as root you can test it out. after you do that you can make it run at boot by creating the following systemd service. /etc/systemd/system/button_daemon.service: once you create the service file you enable it with: |
Beta Was this translation helpful? Give feedback.
-
|
@enyafox I recently discovered that the USB ports on this device are enabled via a set of GPIOs that weren't all getting activated at boot. I updated my kernel patch to enable them as part of the initialization process. While I was add it I also mapped GPIO15 as a button in the kernel. Once you update the kernel you can start managing the rear switch like a normal button/key using triggerhappy etc. |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
Good to hear from you!
I'm not entirely sure I understand the question. Are you asking how they work in my Debian installers?
For those projects I have it setup for them to be installed into
/usr/local/bin/micon_scripts/. The startup scripts are called by systemd services at startup, the shutdown script is linked in/lib/systemd/system-shutdown/so that it gets called at shutdown. These locations are specific to Debian with SystemD.They Python scripts themselves aren't actually Debian/SystemD specific, you could hypothetically use them with other linux distros or even other Operating Systems if you adjust the device names in the scripts. In that case you'd use that systems startup/shutdo…