1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/timemachine_ynh.git synced 2024-09-03 20:26:33 +02:00
timemachine_ynh/scripts/_common.sh

44 lines
1.1 KiB
Bash
Raw Normal View History

2022-06-15 09:54:44 +02:00
#!/bin/bash
#=================================================
# COMMON VARIABLES
#=================================================
# dependencies used by the app
2022-06-15 15:30:00 +02:00
pkg_dependencies="samba avahi-daemon"
2022-06-15 09:54:44 +02:00
#=================================================
# PERSONAL HELPERS
#=================================================
2022-06-15 15:30:00 +02:00
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
}
2022-06-15 15:46:21 +02:00
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
}
2022-06-15 09:54:44 +02:00
#=================================================
# EXPERIMENTAL HELPERS
#=================================================
#=================================================
# FUTURE OFFICIAL HELPERS
#=================================================