View Single Post
Posts: 875 | Thanked: 918 times | Joined on Sep 2010
#4
Sorry, forgot to mention you need to add #!/bin/sh on the first line of the file and set its permissions to 755.

foo contents:
Code:
#!/bin/sh

echo 75 > /proc/sys/vm/swappines
type on command line:
Code:
chmod 755 /etc/init.d/foo
You might also want to name it something like my-startup-commands instead of foo.

If you do, remove foo from runlevels with this command:
Code:
update-rc.d -f foo remove
And then run the other update command for new file name.

Edit:
Only run update once to install the script, you don't need to run it for any changes to the script.
 

The Following User Says Thank You to auouymous For This Useful Post: