Sync application starters on boot and separate ansible tasks from lmn_vm role
This commit is contained in:
parent
39da308ff7
commit
a6eadce948
11 changed files with 101 additions and 45 deletions
20
roles/lmn_fvs/files/lmn-sync
Normal file
20
roles/lmn_fvs/files/lmn-sync
Normal file
|
@ -0,0 +1,20 @@
|
|||
#!/usr/bin/bash
|
||||
#
|
||||
# Synchronize local program directory and desktop starters
|
||||
#
|
||||
set -eu
|
||||
|
||||
if ! nslookup server; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
#[[ -d /usr/local/lmn ]] || mkdir -p /usr/local/lmn
|
||||
#rsync -rlptD --chown=pgmadmin:root --chmod=F755,D755 rsync://server:/local-program/ /usr/local/lmn
|
||||
|
||||
RSYNC_COMMAND=$(rsync -ai --delete --exclude=mimeinfo.cache \
|
||||
--chown=root:root --chmod=F644,D755 "rsync://server:/desktopstarter" \
|
||||
/usr/local/share/applications/ | sed '/ \.\//d')
|
||||
if [[ $? -eq 0 ]] && [[ -n "${RSYNC_COMMAND}" ]]; then
|
||||
echo "${RSYNC_COMMAND}"
|
||||
update-desktop-database /usr/local/share/applications
|
||||
fi
|
Loading…
Add table
Add a link
Reference in a new issue