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 | |
| # for exclude, use relative path from source path | |
| # cd into source path | |
| # use --ignore-existing to write only new files | |
| cd /home/source | |
| rsync -avrP --progress --info=progress2 ./ user@backup:/home/dest/ --exclude 'notthisrelativefolder' |
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 | |
| ansible hosts -a "apt-get 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
| #!/bin/bash | |
| apt-get install git -y | |
| git clone https://github.com/letsencrypt/letsencrypt /usr/local/letsencrypt | |
| cd /usr/local/letsencrypt | |
| ./letsencrypt-auto --help | |
| sudo -H ./letsencrypt-auto certonly --standalone -d example.com -d www.example.com |
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 | |
| mysqldump -u <USER> -h <DBHOST> -p <BDD> > bdddump.sql |
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 | |
| useradd -m -d /home/myuser /bin/bash myuser | |
| su - myuser | |
| ssh-keygen | |
| chown -R myuser /home/myuser | |
| chmod 600 /home/myuser/.ssh/id_rsa | |
| ssh-copy-id [email protected] |
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 | |
| find . -name \*.php -type f -exec php -l {} \; |
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 | |
| DBNAME="" | |
| sed -i 's/utf8mb4/utf8/g' $DBNAME | |
| sed -i 's/utf8_unicode_ci/utf8_general_ci/g' $DBNAME | |
| sed -i 's/utf8_unicode_520_ci/utf8_general_ci/g' $DBNAME |
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 | |
| PASSWORD="" | |
| wget https://repo.zabbix.com/zabbix/3.4/debian/pool/main/z/zabbix-release/zabbix-release_3.4-1+stretch_all.deb | |
| dpkg -i zabbix-release_3.4-1+stretch_all.deb | |
| apt update | |
| apt install zabbix-server-mysql | |
| apt install zabbix-frontend-php | |
| mysql -e "create database zabbix character set utf8 collate utf8_bin;" | |
| mysql -e "grant all privileges on zabbix.* to zabbix@localhost identified by "$PASSWORD";" | |
| wget https://freefr.dl.sourceforge.net/project/zabbix/ZABBIX%20Latest%20Stable/3.4.11/zabbix-3.4.11.tar.gz |
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 | |
| cd /opt ;curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar;ln -s /opt/wp-cli.phar /usr/bin/wp ; chmod +x /usr/bin/wp |
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 | |
| apt -y install cmake gcc libncurses5-dev libreadline-dev libssl-dev make zlib1g-dev git | |
| wget https://www.softether-download.com/files/softether/v4.27-9668-beta-2018.05.29-tree/Linux/SoftEther_VPN_Server/64bit_-_Intel_x64_or_AMD64/softether-vpnserver-v4.27-9668-beta-2018.05.29-linux-x64-64bit.tar.gz | |
| mkdir /opt/softether | |
| mv softether-vpnserver-v4.27-9668-beta-2018.05.29-linux-x64-64bit.tar.gz /opt/softether | |
| cd /opt/softether | |
| tar xf softether-vpnserver-v4.27-9668-beta-2018.05.29-linux-x64-64bit.tar.gz | |
| cd vpnserver | |
| ./configure | |
| make |