关于开机启动服务
Tofloor
poster avatar
187******09
deepin
2018-03-23 19:58
Author
自己写了一个mount.sh脚本挂载win7的共享文件夹,然后在/etc/systemd/system写了一个mount.service想要开机自启这个脚本(内容如下)
  1. [Unit]
  2. Description=re_mount
  3. Requires=network-online.target
  4. After=network-online.target

  5. [Service]
  6. WorkingDirectory=/media/mabo-win7
  7. ExecStart=/bin/sh /home/yj/Documents/Work/Scripts/sh/mount.sh

  8. [Install]
  9. WantedBy=multi-user.target
Copy the Code
问题是每次开机mount.service都是failed的,需要手动执行
  1. systemctl start mount
Copy the Code
然后输入密码才行,请问怎么才能坐到开机自启mount服务,不需要输入密码
在线等,挺急的
Reply Favorite View the author
All Replies

No replies yet