Service to mount samba shares

parent c03e8f10
......@@ -57,3 +57,8 @@ cat <<EOF>>/etc/fstab
//ecole-dc/svc-prof/perso /home/shares/direction/CONFIDENTIEL_PROFESSEURS/ cifs _netdev,users,auto,credentials=/etc/cifs/secrets/prof,uid=direction,gid=direction 0 0
//ecole-dc/svc-dir/perso /home/shares/direction/CONFIDENTIEL_DIRECTION/ cifs _netdev,users,auto,credentials=/etc/cifs/secrets/dir,uid=direction,gid=direction 0 0
EOF
cp `dirname $0`/mount_shares.service /etc/systemd/system/
systemctl daemon-reload
systemctl start mount_shares.service
systemctl enable mount_shares.service
[Unit]
Description=Mount ecole-dc sharing
After=graphical.target
[Service]
Type=oneshot
KillMode=none
ExecStart=/opt/primtux-eole/mount_shares.sh
[Install]
WantedBy=multi-user.target
#!/bin/bash
awk '/^\/\/ecole-dc/{print $2}' /etc/fstab | \
while read dest
do
mount $dest
done
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment