Complete samba?

This commit is contained in:
nagumii 2025-01-30 14:17:43 +02:00
parent 8521180d78
commit 7bac1c22d6
2 changed files with 4 additions and 4 deletions

View file

@ -40,7 +40,7 @@ uninstall() {
}
initialize() {
dialog --no-collapse --title "$title" --yesno "\nIntialize $($package_dir/$1.sh -N)\n\nInitialization runs commands that frequently require user interaction and so can only be run from terminal.\n\nProceed?" 13 50
dialog --no-collapse --title "$title" --yesno "\nIntialize $($package_dir/$1.sh -N)\n\nInitialization runs commands that require user interaction and so can only be run from terminal.\n\nProceed?" 13 50
if [ $? -eq 1 ]; then #if cancel/no
return 1
fi

View file

@ -49,7 +49,7 @@ EOF
# Messages to the user (such as configuration instructions, explanatory error messages, etc) should be given as: `echo "user_message: text"`
# Everything following `user_message: ` will be displayed prominently to the user, so it must the last thing echoed
user_message="To connect to network share, enter \`\\\\\\\\femtofox\\home\` from Windows, \`smb://$(hostname)\\home\` from MacOS or \`smbclient //$(hostname)/femto -U femto\` from Linux.\nDefault configuration shares /home/femto. Edit \`/etc/samba/smb.conf\` to add other shares.\n\nTroubleshooting: if Windows refuses to connect, especially after succeeding previously, hit [win]+R and enter \`net use * /delete\`."
user_message="To connect to network share, enter \`\\\\femtofox\\home\` from Windows, \`smb://$(hostname)\\home\` from MacOS or \`smbclient //$(hostname)/femto -U femto\` from Linux.\nDefault configuration shares /home/femto. Edit \`/etc/samba/smb.conf\` to add other shares.\n\nTroubleshooting: if Windows refuses to connect, especially after succeeding previously, hit [win]+R and enter \`net use * /delete\`."
init_instructions="To enable file sharing, run \`Initialize\` in the femto-config Samba menu, or enable the Samba service, run \`sudo smbpasswd -a femto\` to set a Samba password, and then restart the Samba service."
name="Samba File Sharing" # software name
@ -87,10 +87,10 @@ uninstall() {
# code that must be run to initialize the installation prior to use, but can only be run from terminal
interactive_init() {
$(basename "$0" -e)
echo -e "\nSet user \`Femto\` login password:"
smbpasswd -a femto
$(basename "$0" -r)
/usr/local/bin/packages/samba.sh -e
/usr/local/bin/packages/samba.sh -r
echo -e "user_message: Samba initialized, and service enabled and started. $user_message"
exit 0
}