diff options
Diffstat (limited to 'extra/glhack/glhack.install')
-rw-r--r-- | extra/glhack/glhack.install | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/extra/glhack/glhack.install b/extra/glhack/glhack.install new file mode 100644 index 000000000..78e1655bc --- /dev/null +++ b/extra/glhack/glhack.install @@ -0,0 +1,24 @@ +post_install() { + touch var/games/glhack/{record,perm,logfile} + chown root:games var/games/glhack/{record,perm,logfile} + chmod 664 var/games/glhack/{record,perm,logfile} +} + +pre_upgrade() { + install -d -m775 var/games/glhack + chown root:games var/games/glhack + [ -e usr/share/glhack/record ] && cp usr/share/glhack/record var/games/glhack + [ -e usr/share/glhack/perm ] && cp usr/share/glhack/perm var/games/glhack + [ -e usr/share/glhack/logfile ] && cp usr/share/glhack/logfile var/games/glhack + if [ -d usr/share/glhack/save ]; then + chmod g-s usr/share/glhack/save + mv usr/share/glhack/save var/games/glhack + else + install -d -m775 var/games/glhack/save + fi + chown root:games var/games/glhack/save +} + +post_upgrade() { + post_install +} |