Create file /etc/systemd/system/docker-compose@.service
[Unit]
Description=%i service with docker compose
Requires=docker.service
After=docker.service| sudo apt-get install -y samba samba-common-bin | |
| sudo cp /etc/samba/smb.conf /etc/samba/smb.conf.orig | |
| sudo tee -a ./smb.conf >/dev/null <<'EOF' | |
| [global] | |
| # 3 to debug | |
| log level = 0 | |
| workgroup = WORKGROUP | |
| server string = Samba Server %v | |
| netbios name = pathfinder-2 | |
| security = user |
| #http://www.oidview.com/mibs/0/IF-MIB.html | |
| #http://www.net-snmp.org/docs/mibs/interfaces.html | |
| cisco_custom: | |
| version: 2 | |
| auth: | |
| community: public | |
| walk: | |
| - 1.3.6.1.2.1.2.2.1 | |
| - 1.3.6.1.2.1.31.1.1.1 | |
| metrics: |
| #!/bin/bash | |
| # create the default iplist | |
| sudo ipset create -exist cf4 hash:net | |
| # check if the iptables rule exists and create it if it does not exist | |
| sudo iptables -C INPUT -m set --match-set cf4 src -p tcp --dport 4443 -j ACCEPT > /dev/null 2>&1 | |
| if [ $? -eq 0 ]; then | |
| echo "cf4 rule already exists!" | |
| else |
| #idVendor 0x0b67 Fairbanks Scales | |
| #idProduct 0x555e SCB-R9000 | |
| sudo apt-get update | |
| sudo apt-get install -y ruby ruby-dev bundler samba samba-common-bin libusb-dev libhidapi-hidraw0 libhidapi-libusb0 | |
| sudo cp /etc/samba/smb.conf /etc/samba/smb.conf.orig | |
| sudo bash -c "cat /dev/null > /etc/samba/smb.conf" | |
| sudo tee -a /etc/samba/smb.conf >/dev/null <<'EOF' | |
| [global] |
| input=<>.mkv | |
| output=<>.mp4 | |
| ffmpeg -i ${input} -vcodec libx265 -crf 20 ${output} | |
| # https://stackoverflow.com/questions/23775693/best-video-format-using-ffmpeg-converter?rq=1 | |
| "-b:v 200k -vcodec libx264 -acodec aac -b:a 96k -strict -2" |
| # Fix “invalid or corrupted package (PGP signature)” | |
| sudo pacman -S archlinux-keyring | |
| # update system --noconfirm | |
| sudo pacman -Su | |
| # remove package | |
| sudo pacman -R <package_name> | |
| # add package |
| curl -s https://gist.githubusercontent.com/ilude/bf6d435352610528794d5cac4a0845a1/raw/%21ImageSetup.sh | /bin/bash -s | tee build.log |
| lsblk | |
| sudo fdisk /dev/xvdf | |
| sudo mkfs -t ext4 /dev/xvdf1 | |
| mount /dev/xvdf1 /mnt | |
| sudo rsync -aulvXpogtr /var/* /mnt | |
| umount /mnt | |
| sudo nano /etc/fstab | |
| /dev/xvdf1 /var ext4 defaults,noatime,nofail 0 2 |