Differences
This shows you the differences between two versions of the page.
tech:linux:startup_run [2015/03/11 06:46] |
tech:linux:startup_run [2015/03/11 06:46] (current) |
||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== Run command on startup ====== | ||
+ | This was tested on Redhat | ||
+ | |||
+ | Append the below line to ''/etc/rc.local'' | ||
+ | <code bash> | ||
+ | /sbin/runuser -s /bin/sh -l nobody -c '/etc/haproxy/start-hap' | ||
+ | </code> | ||
+ | where | ||
+ | * s - run in shell | ||
+ | * l - run as user | ||
+ | * c - command to run | ||