Created
May 30, 2020 08:43
-
-
Save teuteuguy/d373fbaa8cc62dd92ab1d49c998fd0be to your computer and use it in GitHub Desktop.
This file contains 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 | |
if [[ $(/usr/bin/id -u) -ne 0 ]]; then | |
echo "You must sudo this script" | |
exit | |
fi | |
apt-get update | |
apt-get upgrade -y | |
apt-get install -y samba samba-common-bin | |
echo >> /etc/samba/smb.conf | |
echo >> /etc/samba/smb.conf | |
echo "[pi4]" >> /etc/samba/smb.conf | |
echo " comment = My Share" >> /etc/samba/smb.conf | |
echo " path = /media/exfat" >> /etc/samba/smb.conf | |
echo " read only = no" >> /etc/samba/smb.conf | |
echo " guest ok = yes" >> /etc/samba/smb.conf | |
echo " browsable = yes" >> /etc/samba/smb.conf | |
echo " force user = pi" >> /etc/samba/smb.conf | |
# [pihole] | |
# comment = My Share | |
# path = /mnt/sandisk | |
# read only = no | |
# guest ok = yes | |
# browsable = yes | |
# force user = pi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment