blob: 47dfe8f93028db97f1158914a8fd3322ddfe0408 (
plain)
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
|
# We only ever create this directory and never remove it,
# because it's not just this package that potentially needs it.
#
# Both sftpman and sftpman-iced (as well as this old Python-based sftpman software) may be using it.
_ensure_mount_path() {
mkdir -p -m 775 /mnt/sshfs
chown :users /mnt/sshfs
}
post_install() {
_ensure_mount_path
# Let's see if everything is OK now..
# This may not be very accurate, because it runs as root,
# but it may still catch some potential problems.
output=$(sftpman preflight_check 2>&1)
if [ ! "$?" = "0" ]; then
echo -e "sftpman preflight_check results:\n"
echo "$output"
fi
}
post_upgrade() {
post_install $1
if [[ "$2" =~ ^1:0\. ]]; then
echo "======================"
echo "NOTE: since sftpman=1.0, config files are stored as .json files, not as .js!";
echo -e "\nYou must relocate your config files:";
echo -e "\t"'for f in $(ls ~/.config/sftpman/mounts/*.js); do n=$(echo $f | sed 's/.js$/.json/'); mv $f $n; done;';
echo "======================"
fi
}
|