File: post-install.rb

package info (click to toggle)
qwik 0.8.4.4
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 3,296 kB
  • ctags: 4,265
  • sloc: ruby: 38,631; ansic: 229; makefile: 195; sh: 140
file content (33 lines) | stat: -rw-r--r-- 787 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# Copyright (C) 2003-2006 Kouichirou Eto, All rights reserved.
# This is free software with ABSOLUTELY NO WARRANTY.
# You can redistribute it and/or modify it under the terms of the GNU GPL 2.

system 'mkdir -p /var/lib/qwik/data/www'
open('/var/lib/qwik/data/www/_SiteConfig.txt', 'wb') {|f|
  f.puts ':open:true'
}
open('/var/lib/qwik/data/www/_GroupMembers.txt', 'wb') {|f|
  f.puts 'guest@qwik'
}

%w(
/var/cache/qwik
/var/lib/qwik
/var/lib/qwik/data
/var/lib/qwik/data/www
/var/log/qwik
/var/run/qwik
).each {|dir|
  system "mkdir #{dir}" if ! File.exist?(dir)
  system "chown -R daemon.daemon #{dir}"
  system "chmod -R go+w #{dir}"
}

=begin
%w(
/var/lib/qwik/data/www/_SiteConfig.txt
/var/lib/qwik/data/www/_GroupMembers.txt
).each {|file|
  system "chmod -R go+w #{dir}"
}
=end