This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# info: check letsencrypt domain | |
# options: USER DOMAIN [ALIASES] [MAIL] | |
# labels: web | |
# | |
# example: v-add-letsencrypt-domain admin wonderland.com www.wonderland.com | |
# | |
# The function check and validates domain with Let's Encrypt | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
listen %ip%:%proxy_port%; | |
server_name %domain_idn% %alias_idn%; | |
include %home%/%user%/conf/web/%domain%/nginx.forcessl.conf*; | |
location / { | |
proxy_pass http://%ip%:%web_port%; | |
location ~* ^.+\.(%proxy_extentions%)$ { | |
root %docroot%; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
BEL=( | |
"http://ipverse.net/ipblocks/data/countries/be.zone" | |
"http://ipverse.net/ipblocks/data/countries/nl.zone" | |
"http://ipverse.net/ipblocks/data/countries/lu.zone" | |
) | |
IP_BEL_TMP=$(mktemp) | |
for i in "${BEL[@]}"; do |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
old_name="default" | |
new_name="new_package" | |
# Update package for existing users | |
for user in `ls /usr/local/hestia/data/users/`; do | |
OLD_PACKAGE=$(/usr/local/hestia/bin/v-get-user-value $user PACKAGE) | |
if [ "$old_name" = "$OLD_PACKAGE" ]; then | |
/usr/local/hestia/bin/v-change-user-package $user $new_name | |
fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
source /etc/hestiacp/hestia.conf | |
source $HESTIA/func/main.sh | |
for user in $($BIN/v-list-users plain | cut -f1 ); do | |
for domain in $($BIN/v-list-web-domains $user plain | cut -f1); do | |
echo "Webdomain: $domain" | |
if [ -f "/home/$user/web/$domain/public_html/wp-config.php" ]; then | |
cd /home/$user/web/$domain/public_html/ | |
user_exec /usr/bin/wp core update |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function mimified_ads($classes) { | |
$categories = get_the_category(); | |
if(is_single()){ | |
if(!in_array($categories[0] -> term_id, array(68,69,71,50))){ | |
$classes[] = 'trending-post'; | |
} | |
} | |
return $classes; |