generated from zj/archlinux-pkg
update
This commit is contained in:
40
tms-bbt-conifg.install
Normal file
40
tms-bbt-conifg.install
Normal file
@@ -0,0 +1,40 @@
|
||||
# post_install: 在软件包安装后执行
|
||||
post_install() {
|
||||
update-desktop-database /usr/share/applications
|
||||
echo "Checking for 'smart' user..."
|
||||
if ! id -u smart &>/dev/null; then
|
||||
echo "WARNING: User 'smart' does not exist. Please create the 'smart' user for SmartTMS to function correctly."
|
||||
echo "You can create it with: sudo useradd -m smart"
|
||||
else
|
||||
# 处理 .bashrc
|
||||
if [ -f "/home/smart/.bashrc" ]; then
|
||||
mv "/home/smart/.bashrc_tms-config" "/home/smart/.bashrc"
|
||||
chown smart:smart "/home/smart/.bashrc"
|
||||
echo "Copied ~/.bashrc_tms-config to /home/smart/.bashrc."
|
||||
else
|
||||
# 如果 .bashrc 不存在,则直接复制我们的模板
|
||||
cp "/home/smart/.bashrc_tms-config" "/home/smart/.bashrc"
|
||||
chown smart:smart "/home/smart/.bashrc"
|
||||
echo "Copied ~/.bashrc_tms-config to /home/smart/.bashrc."
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "cp desktop"
|
||||
cp -f '/usr/share/applications/barco-communicator.desktop' /home/smart/Desktop
|
||||
cp -f '/usr/share/applications/barco-commander.desktop' /home/smart/Desktop
|
||||
cp -f '/usr/share/applications/DCC2.desktop' /home/smart/Desktop
|
||||
cp -f '/usr/share/applications/DCC.desktop' /home/smart/Desktop
|
||||
cp -f '/usr/share/applications/restart.desktop' /home/smart/Desktop
|
||||
cp -f '/usr/share/applications/dcpomatic2.desktop' /home/smart/Desktop
|
||||
cp -f '/usr/share/applications/org.remmina.Remmina.desktop' /home/smart/Desktop
|
||||
cp -f '/usr/share/applications/tms.desktop' /home/smart/Desktop
|
||||
cp -f '/usr/share/applications/sunlogin.desktop' /home/smart/Desktop
|
||||
cp -f '/usr/share/applications/com.teamviewer.TeamViewer.desktop' /home/smart/Desktop
|
||||
cp -f '/usr/share/applications/todesk.desktop' /home/smart/Desktop
|
||||
cp -f '/usr/share/applications/uzipkdm.desktop' /home/smart/Desktop
|
||||
ln -s /media/kdm /home/smart/Desktop/密钥
|
||||
ln -s /media/cinema /home/smart/Desktop/片库
|
||||
chown smart:smart /home/smart/Desktop/*
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user