创建auth-up文件 vi /etc/ppp/auth-up chmod a+x /etc/ppp/auth-up auth-up脚本内容如下 #!/bin/sh # get the username/ppp line number from the parameters REALDEVICE=$1 USER=$2 # create the directory to keep pid files per user mkdir -p /var/run/pptpd-users # if there…
1.想在运行时抛出异常,终止方法的运行 private final Set<Long> THREADS = new HashSet<>(); public void someMethod () { if (THREADS.contains(Thread.currentThread().getId())) { throw new RuntimeException("该线程不能再调用这个方法"); } THREADS.add(Thread.currentThread…