New User Startup Script

Kernel, Main, Utilities & Applications, Miscellaneous Devices.
jca
Top Contributor
Posts: 1911
Joined: Wed May 27, 2020 1:59 pm
Has thanked: 145 times
Been thanked: 454 times

New User Startup Script

Unread post by jca »

Does anyone knows how to use this thing?
Until now I had my own S99xxx scripts in /etc/init.d but I have to reinstall them each time there is a Linux update. I suppose this new system which consists of /etc/init.d/S99User and /media/fat/linux/user-startup.sh will allow preservation of custom scripts when Linux is updated.
ziggurat
Posts: 6
Joined: Mon May 25, 2020 9:42 am
Been thanked: 1 time

Re: New User Startup Script

Unread post by ziggurat »

Just create the file `/media/fat/linux/user-startup.sh`

The first line of the file needs to be a shebang, so start the file with something like `#!/bin/sh` if you are okay with just a POSIX script or `#!/usr/bin/env bash` if you want a bash script.
Then just do what you want. If its a simple script that doesn't need fancy things from bash try the POSIX, they can be faster to run. I don't go out of my way to use only POSIX scripts, but if I can.
Post Reply