Skip to content

Instantly share code, notes, and snippets.

@pedrolamas
pedrolamas / docker-iptables-fix.sh
Created August 18, 2020 19:32
Script to fix Docker iptables on Synology NAS
#!/bin/bash
currentAttempt=0
totalAttempts=10
delay=15
while [ $currentAttempt -lt $totalAttempts ]
do
currentAttempt=$(( $currentAttempt + 1 ))
echo "Attempt $currentAttempt of $totalAttempts..."
@lostandfound
lostandfound / ec2_www.sh
Last active November 12, 2023 11:31
EC2のAmazon Linux で ec2-user を apache グループに追加し、/var/www ディレクトリに apache グループの所有権を与え、グループに書き込み権限を割り当てる
#!/bin/sh
# EC2のAmazon Linux で ec2-user を apache グループに追加し、
# /var/www ディレクトリに apache グループの所有権を与え、グループに書き込み権限を割り当てます。
# source http://docs.aws.amazon.com/ja_jp/AWSEC2/latest/UserGuide/install-LAMP.html
ls -l /var/www
# ユーザー(この場合は ec2-user)を apache グループに追加します。
sudo usermod -a -G apache ec2-user