Look at LSB init scripts for more information.
Copy to /etc/init.d:
# replace "$YOUR_SERVICE_NAME" with your service's name (whenever it's not enough obvious)Look at LSB init scripts for more information.
Copy to /etc/init.d:
# replace "$YOUR_SERVICE_NAME" with your service's name (whenever it's not enough obvious)| #include <unistd.h> | |
| #include <errno.h> | |
| main( int argc, char ** argv, char ** envp ) | |
| { | |
| if( setgid(getegid()) ) perror( "setgid" ); | |
| if( setuid(geteuid()) ) perror( "setuid" ); | |
| envp = 0; /* blocks IFS attack on non-bash shells */ | |
| system( "/path/to/bash/script", argv, envp ); | |
| perror( argv[0] ); |
| #!/bin/bash | |
| # This script creates a user account under Mac OS X | |
| # === Typically, this is all you need to edit === | |
| USERNAME= | |
| FULLNAME= | |
| PASSWORD= | |
| # A list of (secondary) groups the user should belong to |
| <!doctype html> | |
| <title>Site Maintenance</title> | |
| <style> | |
| body { text-align: center; padding: 150px; } | |
| h1 { font-size: 50px; } | |
| body { font: 20px Helvetica, sans-serif; color: #333; } | |
| article { display: block; text-align: left; width: 650px; margin: 0 auto; } | |
| a { color: #dc8100; text-decoration: none; } | |
| a:hover { color: #333; text-decoration: none; } | |
| </style> |
| $HTTP["host"] =~ "^source\.com$" { | |
| url.redirect = ( "^/(.*)" => "http://dest.com/$1") | |
| } |
| #!/bin/bash | |
| if [ "$1" = "-h" -o "$1" = "--help" -o -z "$1" ]; then cat <<EOF | |
| appify v3.0.1 for Mac OS X - http://mths.be/appify | |
| Creates the simplest possible Mac app from a shell script. | |
| Appify takes a shell script as its first argument: | |
| `basename "$0"` my-script.sh |
| <?PHP | |
| // Generates a strong password of N length containing at least one lower case letter, | |
| // one uppercase letter, one digit, and one special character. The remaining characters | |
| // in the password are chosen at random from those four sets. | |
| // | |
| // The available characters in each set are user friendly - there are no ambiguous | |
| // characters such as i, l, 1, o, 0, etc. This, coupled with the $add_dashes option, | |
| // makes it much easier for users to manually type or speak their passwords. | |
| // | |
| // Note: the $add_dashes option will increase the length of the password by |