]>
git.proxmox.com Git - dab-pve-appliances.git/blob - archive/debian-6.0-wordpress/wordpress_setup
3 # Provides: wordpress_siteconfig
4 # Required-Start: $remote_fs mysql +mysql_randompw
6 # X-Start-Before: apache2
9 # Short-Description: Generate Wordpress Siteconfig
10 # Description: Generate Wordpress
15 DOMAIN
=`grep '^search' /etc/resolv.conf|awk '{ print $2; }'`
16 HNAME
=`head -n 1 /etc/hostname|awk '{ print $1; }'`
18 if [ "X${HNAME}" = "Xlocalhost" ] ; then
22 echo "Generate Wordpress Siteconfig"
24 # set HOME dir (for .my.cfg)
28 PASSWD
=`openssl rand -base64 9`
31 # create the wordpress database user
32 CREATE DATABASE wordpress;
33 CREATE USER wordpress IDENTIFIED BY '${PASSWD}';
34 GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER ON wordpress.* TO 'wordpress'@'localhost' IDENTIFIED BY '${PASSWD}';
39 SKEY1
=`openssl rand -base64 42`
40 SKEY2
=`openssl rand -base64 42`
41 SKEY3
=`openssl rand -base64 42`
42 SKEY4
=`openssl rand -base64 42`
44 cat <<EOF > /var/www/wordpress/wp-config.php
46 // ** MySQL settings - You can get this info from your web host ** //
47 /** The name of the database for WordPress */
48 define('DB_NAME', 'wordpress');
50 /** MySQL database username */
51 define('DB_USER', 'wordpress');
53 /** MySQL database password */
54 define('DB_PASSWORD', '${PASSWD}');
57 define('DB_HOST', 'localhost');
59 /** Database Charset to use in creating database tables. */
60 define('DB_CHARSET', 'utf8');
62 /** The Database Collate type. Don't change this if in doubt. */
63 define('DB_COLLATE', '');
66 * Authentication Unique Keys.
68 * Change these to different unique phrases!
69 * You can generate these using the {@link http://api.wordpress.org/secret-key/1.1/ WordPress.org secret-key service}
73 define('AUTH_KEY', '${SKEY1}');
74 define('SECURE_AUTH_KEY', '${SKEY2}');
75 define('LOGGED_IN_KEY', '${SKEY3}');
76 define('NONCE_KEY', '${SKEY4}');
80 * WordPress Database Table prefix.
82 * You can have multiple installations in one database if you give each a unique
83 * prefix. Only numbers, letters, and underscores please!
85 \$table_prefix = 'wp_';
88 * WordPress Localized Language, defaults to English.
90 * Change this to localize WordPress. A corresponding MO file for the chosen
91 * language must be installed to wp-content/languages. For example, install
92 * de.mo to wp-content/languages and set WPLANG to 'de' to enable German
95 define ('WPLANG', '');
97 /* That's all, stop editing! Happy blogging. */
99 /** WordPress absolute path to the Wordpress directory. */
100 if ( !defined('ABSPATH') )
101 define('ABSPATH', dirname(__FILE__) . '/');
103 /** Sets up WordPress vars and included files. */
104 require_once(ABSPATH . 'wp-settings.php');
108 insserv
-r wordpress_setup
109 rm -f /etc
/init.d
/wordpress_setup