mirror of
https://github.com/YunoHost-Apps/timemachine_ynh.git
synced 2024-09-03 20:26:33 +02:00
40 lines
1.1 KiB
Bash
40 lines
1.1 KiB
Bash
#!/bin/bash
|
|
|
|
#=================================================
|
|
# COMMON VARIABLES
|
|
#=================================================
|
|
|
|
#=================================================
|
|
# PERSONAL HELPERS
|
|
#=================================================
|
|
|
|
samba_sysadmin_setup () {
|
|
if [[ -d /etc/smb/smb.d ]]
|
|
then
|
|
echo "/etc/smb/smb.d exists on your filesystem."
|
|
else
|
|
mkdir -p /etc/smb/smb.d
|
|
fi
|
|
}
|
|
|
|
samba_sysadmin_update () {
|
|
# Update the smb.conf file
|
|
ls /etc/smb/smb.d/* | sed -e 's/^/include = /' > /etc/smb/includes.conf
|
|
}
|
|
|
|
samba_sysadmin_add () {
|
|
if grep -R "include = /etc/sdmb/includes.conf" /etc/samba/smb.conf
|
|
then
|
|
echo "The includes.conf file is already present in your smb.conf file."
|
|
else
|
|
echo "include = /etc/smb/includes.conf" >> /etc/samba/smb.conf
|
|
fi
|
|
}
|
|
|
|
#=================================================
|
|
# EXPERIMENTAL HELPERS
|
|
#=================================================
|
|
|
|
#=================================================
|
|
# FUTURE OFFICIAL HELPERS
|
|
#=================================================
|