Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
scripts
mahara-scripts
Commits
08977983
Commit
08977983
authored
Jun 03, 2011
by
Richard Mansfield
Browse files
Run langpacks scripts as maharabot user
parent
91f6ff9d
Changes
3
Hide whitespace changes
Inline
Side-by-side
debian/custom-site-mahara-langpacks.cron.d
View file @
08977983
#
#
Regular
cron
jobs
for
the
custom
-
site
-
mahara
-
langpacks
package
#
22
*
*
*
*
ro
ot
[
-
x
/
usr
/
lib
/
mahara
-
langpacks
/
langpacks
.
sh
]
&&
/
usr
/
lib
/
mahara
-
langpacks
/
langpacks
.
sh
>>
/
var
/
log
/
mahara
-
langpacks
.
log
2
>&
1
52
*
*
*
*
ro
ot
[
-
x
/
usr
/
lib
/
mahara
-
langpacks
/
update
-
pot
.
sh
]
&&
/
usr
/
lib
/
mahara
-
langpacks
/
update
-
pot
.
sh
>>
/
var
/
log
/
mahara
-
langpacks
.
log
2
>&
1
#
22
*
*
*
*
maharab
ot
[
-
x
/
usr
/
lib
/
mahara
-
langpacks
/
langpacks
.
sh
]
&&
/
usr
/
lib
/
mahara
-
langpacks
/
langpacks
.
sh
>>
/
var
/
log
/
mahara
-
langpacks
/
langpacks
.
log
2
>&
1
#
52
*
*
*
*
maharab
ot
[
-
x
/
usr
/
lib
/
mahara
-
langpacks
/
update
-
pot
.
sh
]
&&
/
usr
/
lib
/
mahara
-
langpacks
/
update
-
pot
.
sh
>>
/
var
/
log
/
mahara
-
langpacks
/
update
-
pot
.
log
2
>&
1
debian/custom-site-mahara-langpacks.postinst
View file @
08977983
...
...
@@ -19,16 +19,39 @@ set -e
case
"
$1
"
in
configure
)
adduser
--system
--quiet
maharabot
if
[
!
-d
/home/maharabot/.ssh
]
;
then
mkdir
/home/maharabot/.ssh
ssh-keygen
-q
-t
rsa
-N
''
-f
/home/maharabot/.ssh/id_rsa
chown
-R
maharabot /home/maharabot/.ssh
fi
if
[
!
-d
/var/www/mahara-langpacks
]
;
then
mkdir
/var/www/mahara-langpacks
fi
if
[
`
stat
-c
%U /var/www/mahara-langpacks
`
!=
'maharabot'
]
;
then
chown
-R
maharabot /var/www/mahara-langpacks
fi
if
[
!
-d
/var/lib/mahara-langpacks
]
;
then
mkdir
/var/lib/mahara-langpacks
fi
if
[
`
stat
-c
%U /var/lib/mahara-langpacks
`
!=
'maharabot'
]
;
then
chown
-R
maharabot /var/lib/mahara-langpacks
fi
if
[
!
-d
/var/log/apache2/mahara-langpacks
]
;
then
mkdir
/var/log/apache2/mahara-langpacks
fi
if
[
!
-d
/var/log/mahara-langpacks
]
;
then
mkdir
/var/log/mahara-langpacks
chown
maharabot /var/log/mahara-langpacks
fi
echo
"DATA=/var/lib/mahara-langpacks"
>
/etc/mahara-langpacks.conf
echo
"SCRIPTS=/usr/lib/mahara-langpacks"
>>
/etc/mahara-langpacks.conf
echo
"DOCROOT=/var/www/mahara-langpacks"
>>
/etc/mahara-langpacks.conf
...
...
debian/custom-site-mahara-langpacks.postrm
View file @
08977983
...
...
@@ -22,6 +22,7 @@ case "$1" in
rm
-rf
/var/lib/mahara-langpacks
rm
-rf
/var/www/mahara-langpacks
rm
-rf
/var/log/apache2/mahara-langpacks
rm
-rf
/var/log/mahara-langpacks
rm
-f
/etc/apache2/sites-available/mahara-langpacks.conf
;;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment