Reverse logic

This commit is contained in:
Bob Mottram 2017-08-06 17:12:03 +01:00
parent 66f784ed55
commit bb64427344
4 changed files with 5 additions and 11 deletions

View File

@ -570,7 +570,9 @@ function remove_gnusocial {
sed -i '/gnusocial/d' $COMPLETION_FILE
remove_backup_database_local gnusocial
if grep -q 'gnusocial-firewall' /etc/crontab; then
sed -i '/gnusocial-firewall/d' /etc/crontab
fi
function_check remove_ddns_domain
remove_ddns_domain $GNUSOCIAL_DOMAIN_NAME

View File

@ -466,16 +466,11 @@ function remove_koel {
drop_database koel
function_check remove_onion_service
remove_onion_service koel ${KOEL_ONION_PORT}
if grep -q "koel" /etc/crontab; then
sed -i "/koel/d" /etc/crontab
fi
remove_app koel
remove_completion_param install_koel
sed -i '/koel/d' $COMPLETION_FILE
remove_backup_database_local koel
sed -i '/koel-firewall/d' /etc/crontab
function_check remove_ddns_domain
remove_ddns_domain $KOEL_DOMAIN_NAME
}

View File

@ -374,9 +374,6 @@ function remove_nextcloud {
drop_database nextcloud
function_check remove_onion_service
remove_onion_service nextcloud ${NEXTCLOUD_ONION_PORT}
if grep -q "nextcloud" /etc/crontab; then
sed -i "/nextcloud/d" /etc/crontab
fi
remove_app nextcloud
remove_completion_param install_nextcloud
sed -i '/nextcloud/d' $COMPLETION_FILE

View File

@ -83,7 +83,7 @@ function turn_logging_off {
}
function turn_off_rsys_logging {
if grep -q '/var/log/auth.log' /etc/rsyslog.conf; then
if ! grep -q '/var/log/auth.log' /etc/rsyslog.conf; then
return
fi
sed -i 's|mail,news.none.*|mail,news.none /dev/null|g' /etc/rsyslog.conf
@ -109,7 +109,7 @@ function turn_off_rsys_logging {
}
function turn_on_rsys_logging {
if ! grep -q '/var/log/auth.log' /etc/rsyslog.conf; then
if grep -q '/var/log/auth.log' /etc/rsyslog.conf; then
return
fi
sed -i 's|mail,news.none.*|mail,news.none -/var/log/messages|g' /etc/rsyslog.conf