fixed install script
This commit is contained in:
parent
2fc4f8c963
commit
02b8970c1c
2 changed files with 16 additions and 9 deletions
|
|
@ -14,21 +14,23 @@ rc_cmd $1
|
|||
EOF
|
||||
chmod 555 /etc/rc.d/docstore
|
||||
rcctl enable docstore
|
||||
rcctl set docstore flags server -c /var/wiki/docstore.conf
|
||||
rcctl set docstore flags server -c /var/docstore/docstore.conf
|
||||
|
||||
# user
|
||||
useradd -m -b /var -s /sbin/nologin wiki
|
||||
# user and group
|
||||
mkdir /var/docstore
|
||||
groupadd docstore
|
||||
useradd -d /var/docstore -s /sbin/nologin -g docstore docstore
|
||||
chown docstore:docstore /var/docstore
|
||||
|
||||
# config
|
||||
cat <<EOF> /var/wiki/docstore.conf
|
||||
cat <<EOF> /var/docstore/docstore.conf
|
||||
{
|
||||
"data_dir": "/var/wiki",
|
||||
"secret": "$(openssl rand -hex 32)",
|
||||
"secure_cookie": true
|
||||
"data_dir": "/var/docstore",
|
||||
"secret": "$(openssl rand -hex 32)"
|
||||
}
|
||||
EOF
|
||||
chmod 640 /var/wiki/docstore.conf
|
||||
chgrp wiki /var/wiki/docstore.conf
|
||||
chmod 640 /var/docstore/docstore.conf
|
||||
chgrp docstore /var/docstore/docstore.conf
|
||||
|
||||
# start
|
||||
rcctl start docstore
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue