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
#!/usr/bin/env bash | |
certificateFile="${HOME}/Downloads/staging-multihost.crt" | |
certificateName="*.ati.doc_autoimport" | |
for certDB in $(find ~/.mozilla* -name "cert*.db") | |
do | |
certDir=$(dirname ${certDB}); | |
#log "mozilla certificate" "install '${certificateName}' in ${certDir}" | |
certutil -A -n "${certificateName}" -t "TCu,Cuw,Tuw" -i ${certificateFile} -d ${certDir} | |
echo "${certDB}" |
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
USE master; | |
GO | |
IF OBJECT_ID('tempdb.dbo.#tmp_sqlQuery') IS NOT NULL | |
DROP TABLE #tmp_sqlQuery | |
GO | |
CREATE TABLE #tmp_sqlQuery ( sqlQuery NVARCHAR(MAX) ) | |
DECLARE @nameDB NVARCHAR(255) |
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
#!/usr/bin/env bash | |
set -e | |
# Копируются файлы moodle из заданных директорий | |
# Делается бэкап БД Postgresql | |
# Всё это дело суётся в tar и сжимается gzip | |
# Всё что старше 1 дня рекурсивно удаляется (удалятся также директории и файлы, которые названы не в формате "ггггммдд") | |
declare -r DATE="$(date +%Y%m%d)" |
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
#!/usr/bin/env bash | |
# Requirements | |
# debian/ubuntu | |
apt-get -y update && apt-get -y upgrade | |
apt-get -y install strongswan xl2tpd libstrongswan-standard-plugins libstrongswan-extra-plugins | |
VPN_SERVER_IP='' | |
VPN_IPSEC_PSK='' | |
VPN_USER='' |