blob: f3000091a0370914d2e40abf6185673b5d4cfcef (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
post_install() {
for username in `ls /home`; do
user_exists=$(id -u $username > /dev/null 2>&1; echo $?)
if [ "$user_exists" != "1" ]; then
su - $username -c "mkdir -p /home/$username/.config/systemd/user/graphical.target.wants/"
su - $username -c "ln -s /usr/lib/systemd/user/appimaged.service /home/$username/.config/systemd/user/graphical.target.wants/appimaged.service"
fi
done
}
pre_remove() {
for username in `ls /home`; do
user_exists=$(id -u $username > /dev/null 2>&1; echo $?)
if [ "$user_exists" != "1" ]; then
su - $username -c "rm /home/$username/.config/systemd/user/graphical.target.wants/appimaged.service"
su - $username -c "rmdir /home/$username/.config/systemd/user/graphical.target.wants > /dev/null 2>&1"
fi
done
}
|