[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[Freedombox-discuss] Sharebox and tools for generating FreedomBox images



And the other script, sorry about the noise.

-- 
Freedom-based blog/wiki/web hosting: http://www.branchable.com/
-------------- next part --------------
#!/usr/bin/python

import crypt
import os
import sys

rootdir = sys.argv[1]

# Create /srv/sharebox for holding shared files.
sharebox = os.path.join(rootdir, 'srv', 'sharebox')
os.mkdir(sharebox)
os.chmod(sharebox, 0777)

# Configure Samba to serve /srv/sharebox.
conf = os.path.join(rootdir, 'etc', 'samba', 'smb.conf')
f = open(conf, 'a')
f.write('''
[sharebox]
   path = /srv/sharebox
   browseable = yes
   guest ok = yes
   read only = no
''')
f.close()



Reply to: