diff --git a/debian/linode-longview.config b/debian/linode-longview.config index ec980f6..81e934e 100755 --- a/debian/linode-longview.config +++ b/debian/linode-longview.config @@ -42,7 +42,7 @@ apache_status_path() { if [ ! -z $apache_url ]; then if _check_apache_url $apache_url ; then echoerr "Found Apache status page at $apache_url specified in $apache_config_filename" - db_set Longivew/apache-location "" + db_set Longview/apache-location "" return 0 elif [ "$apache_url" = "$apache_default_url" ]; then echoerr "Attempt to access $apache_url specified in $apache_config_filename failed..." @@ -50,22 +50,22 @@ apache_status_path() { echoerr "Attempt to access $apache_url specified in $apache_config_filename failed...trying default" if _check_apache_url $apache_default_url; then echoerr "Found Apache status page at $apache_default_url (default URL)" - db_set Longivew/apache-location "$apache_default_url" + db_set Longview/apache-location "$apache_default_url" return 0; elif _check_apache_url $apache_default_https; then echoerr "Found Apache status page at $apache_default_https" - db_set Longivew/apache-location "$apache_default_https" + db_set Longview/apache-location "$apache_default_https" return 0; fi fi else if _check_apache_url $apache_default_url; then echoerr "Found Apache status page at $apache_default_url (default URL)" - db_set Longivew/apache-location "$apache_default_url" + db_set Longview/apache-location "$apache_default_url" return 0; elif _check_apache_url $apache_default_https; then echoerr "Found Apache status page at $apache_default_https" - db_set Longivew/apache-location "$apache_default_https" + db_set Longview/apache-location "$apache_default_https" return 0; fi fi @@ -75,12 +75,12 @@ apache_status_path() { if [ ! -z $guess_url ]; then if _check_apache_url http://127.0.0.1$guess_url?auto; then echoerr "Found Apache status page at http://127.0.0.1$guess_url?auto" - db_set Longivew/apache-location "http://127.0.0.1$guess_url?auto" + db_set Longview/apache-location "http://127.0.0.1$guess_url?auto" return 0 fi fi - db_set Longivew/apache-location "$apache_default_url" + db_set Longview/apache-location "$apache_default_url" db_fset Longview/apache-try-configure seen "false" db_input high Longview/apache-try-configure } @@ -97,7 +97,7 @@ nginx_status_path(){ if [ ! -z $nginx_url ]; then if _check_nginx_url $nginx_url; then echoerr "Found nginx status page at $nginx_url specified in $nginx_config_filename" - db_set Longivew/nginx-location "" + db_set Longview/nginx-location "" return 0 elif [ "$nginx_url" = "$nginx_default_url" ]; then echoerr "Attempt to access $nginx_url specified in $nginx_config_filename failed..." @@ -105,11 +105,11 @@ nginx_status_path(){ echoerr "Attempt to access $nginx_url specified in $nginx_config_filename failed...trying default" if _check_nginx_url $nginx_default_url; then echoerr "Found nginx status page at $nginx_default_url (default URL)" - db_set Longivew/nginx-location "" + db_set Longview/nginx-location "" return 0; elif _check_nginx_url $nginx_default_https; then echoerr "Found nginx status page at $nginx_default_https" - db_set Longivew/nginx-location "$nginx_default_https" + db_set Longview/nginx-location "$nginx_default_https" return 0; fi fi @@ -117,18 +117,18 @@ nginx_status_path(){ if _check_nginx_url $nginx_default_url; then echoerr "Found nginx status page at $nginx_default_url (default URL)" - db_set Longivew/nginx-location "" + db_set Longview/nginx-location "" return 0; elif _check_nginx_url $nginx_default_https; then echoerr "Found nginx status page at $nginx_default_https" - db_set Longivew/nginx-location "$nginx_default_https" + db_set Longview/nginx-location "$nginx_default_https" return 0; fi # don't be smart unless we know where to work if [ ! -d /etc/nginx/sites-enabled ]; then echoerr "Unable to automatically configure nginx for Longview. Please see https://library.linode.com/longview/longview-for-nginx#sph_manual-configuration-all-distributions" - db_set Longivew/nginx-location "" + db_set Longview/nginx-location "" return 0 fi @@ -136,18 +136,18 @@ nginx_status_path(){ # check to make sure that the haxor mode is gonna work if grep -ri '^[[:space:]]*server_name.*127\.0\.0\.2' /etc/nginx/sites-enabled; then echoerr "Unable to automatically configure nginx for Longview. Please see https://library.linode.com/longview/longview-for-nginx#sph_manual-configuration-all-distributions" - db_set Longivew/nginx-location "" + db_set Longview/nginx-location "" return 0 fi if [ -e /etc/nginx/sites-available/longview ]; then if _check_nginx_url http://127.0.0.2/nginx_status; then echoerr "Found location configured by Longview previously." - db_set Longivew/nginx-location "http://127.0.0.2/nginx_status" + db_set Longview/nginx-location "http://127.0.0.2/nginx_status" return 0 fi echoerr "Unable to automatically configure nginx for Longview. Please see https://library.linode.com/longview/longview-for-nginx#sph_manual-configuration-all-distributions" - db_set Longivew/nginx-location "" + db_set Longview/nginx-location "" return 0 fi db_input high Longview/nginx-try-configure || true @@ -163,7 +163,7 @@ mysql_cred_check() { if [ ! -z $mysql_username ] && [ ! -z $mysql_password ]; then if _mysql_check_install $mysql_username $mysql_password; then echoerr "Successfully connected to MySQL with the credentials located in $mysql_config_filename" - db_set Longivew/mysql-password "" + db_set Longview/mysql-password "" return 0 else echoerr "Unable to connect using the credentials specified in $mysql_config_filename...trying Debian maintenance user" @@ -174,7 +174,7 @@ mysql_cred_check() { mysql_password=$(egrep '^\s*password\s*=\s*' /etc/mysql/debian.cnf | head -n1 | sed 's/^\s*password\s*=\s*//') if _mysql_check_install debian-sys-maint $mysql_password; then echoerr "Successfully connected to MySQL" - db_set Longivew/mysql-password "" + db_set Longview/mysql-password "" if [ ! -z $mysql_username ] && [ ! -z $mysql_password ]; then db_subst Longview/mysql-overwrite-creds found_user "$mysql_username" db_input high Longview/mysql-overwrite-creds || true @@ -188,7 +188,7 @@ mysql_cred_check() { create_statement="CREATE USER 'linode-longview'@'localhost' IDENTIFIED BY '$mysql_password';" - db_set Longivew/mysql-password "$mysql_password" + db_set Longview/mysql-password "$mysql_password" db_subst Longview/mysql-create-creds create_statement "$create_statement" db_input high Longview/mysql-create-creds || true } diff --git a/debian/linode-longview.postinst b/debian/linode-longview.postinst index c20303d..44c0dce 100755 --- a/debian/linode-longview.postinst +++ b/debian/linode-longview.postinst @@ -40,7 +40,7 @@ _write_option(){ apache_install() { apache_config_filename=${longview_config_dir}Apache.conf - db_get Longivew/apache-location + db_get Longview/apache-location location="$RET" if [ ! -z "$location" ]; then @@ -103,7 +103,7 @@ END nginx_install() { nginx_config_filename=${longview_config_dir}Nginx.conf - db_get Longivew/nginx-location + db_get Longview/nginx-location location="$RET" if [ ! -z "$location" ]; then @@ -166,7 +166,7 @@ mysql_install() { if [ ! -z "$pass" ]; then _write_option $mysql_config_filename username "linode-longview" _write_option $mysql_config_filename password "$pass" - db_set Longivew/mysql-password "" + db_set Longview/mysql-password "" return 0 fi } diff --git a/debian/linode-longview.templates b/debian/linode-longview.templates index fb6943a..ac64c6e 100644 --- a/debian/linode-longview.templates +++ b/debian/linode-longview.templates @@ -4,7 +4,7 @@ Default: Description: Please enter your Longview API Key: Please enter your Longview API Key. -Template: Longivew/apache-location +Template: Longview/apache-location Type: string Default: Description: Mod_Status URL: @@ -18,7 +18,7 @@ Description: Autoconfigure Mod_Status: the server status page. Would you like to attempt to automatically configure mod_status? This will require reloading Apache to enable. -Template: Longivew/nginx-location +Template: Longview/nginx-location Type: string Default: Description: Nginx Status URL: @@ -51,7 +51,7 @@ Description: Overwrite existing Longview MySQL config: 'debian-sys-maint' user was found, would you like to configure longview to use those credentials instead? -Template: Longivew/mysql-password +Template: Longview/mysql-password Type: string Default: Description: Longview Mysql user password: