updated on Thu Jan 19 12:17:07 UTC 2012
[aur-mirror.git] / sftpman / sftpman.install
blob6b28872e6217387239d270ffb9f295c07fab654a
1 _ensure_mount_path() {
2         mkdir -p -m 775 /mnt/sshfs
3         chown :users /mnt/sshfs
6 post_install() {
7         _ensure_mount_path
9         # Let's see if everything is OK now..
10         # This may not be very accurate, because it runs as root,
11         # but it may still catch some potential problems.
12         output=$(sftpman preflight_check 2>&1)
13         if [ ! "$?" = "0" ]; then
14                 echo -e "sftpman preflight_check results:\n"
15                 echo "$output"
16         fi
19 post_upgrade() {
20         post_install $1
23 pre_remove() {
24         echo "Unmounting any sftpman-mounted filesystems.."
25         # The sleep.d script knows how to unmount sftpman filesystems for all users.
26         # It's usually used during suspend/hibernate.
27         /etc/pm/sleep.d/49-sftpman suspend
30 post_remove() {
31         rmdir --ignore-fail-on-non-empty /mnt/sshfs