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

Lars Wirzenius liw at liw.fi
Mon May 30 18:22:28 UTC 2011


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()



More information about the Freedombox-discuss mailing list